123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- import React from 'react';
- import {StyleSheet, View, Text , Button} from 'react-native';
- import { TextInput } from 'react-native';
- export default class MainBar{
- constructor(){
- this.__save = null
- }
- onSave(fn){
- this.__save = fn;
- }
- save(){
- this.__save && this.__save();
- }
- triggerSave(){
- this.save();
- }
- none(){
-
- }
- render(){
- return (
- <View style={styles.container}>
- <Text>
- Structure
- </Text>
- <Text>
- Design
- </Text>
- <Button
- onPress={(e) => this.triggerSave()}
- title="Save"
- color="#841584" />
- <Button
- onPress={(e) => this.none()}
- title="AnotherFunc"
- color="#841584" />
-
- </View>)
- }
- }
- const styles = StyleSheet.create({
- container:{
- flex:1,
- justifyContent: 'space-around',
- flexDirection:'row',
- }
- })
|