import React, { useState } from 'react';
import {View , Text, TextInput, Button,StyleSheet} from 'react-native';
import { Icon } from 'react-native-elements'
export default function TextEditor(props) {
let [text, setText] = useState(props.text || '');
let title = props.title || "Input";
return (
{title}
{
props.onChange && props.onChange(text);
setText(text);
}}
value={text}/>
);
}
const styles = StyleSheet.create({
container:{
padding:10
},
defaultInput: {
marginTop:6,
borderWidth:1,
width:200
},
title: {
}
})
/*
{key}
this.editNode(text, key, Structure[key])}
value={this.viewNode.props[key]}
keyboardType={Structure[key].constructor.name === 'Interger' ? 'numeric':null}
/>
*/