|
@@ -13,26 +13,23 @@ export default class TextComp extends Module {
|
|
|
|
|
|
display() {
|
|
display() {
|
|
let {
|
|
let {
|
|
|
|
+ text,
|
|
color,
|
|
color,
|
|
fontSize
|
|
fontSize
|
|
} = this.props;
|
|
} = this.props;
|
|
return (
|
|
return (
|
|
<View>
|
|
<View>
|
|
- <TextInput
|
|
|
|
- style={{color, fontSize}]}
|
|
|
|
- onChangeText={(text) => this.setState({
|
|
|
|
- text
|
|
|
|
- })}
|
|
|
|
- value={this.state.text || 'Default Text'}/>
|
|
|
|
-
|
|
|
|
- {this.props.children}
|
|
|
|
-
|
|
|
|
|
|
+ <Text style={{color, fontSize}}>
|
|
|
|
+ {text}
|
|
|
|
+ </Text>
|
|
|
|
+ {this.props.children}
|
|
</View>)
|
|
</View>)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
TextComp.Inputs = {
|
|
TextComp.Inputs = {
|
|
|
|
+ text: new Types.Text(),
|
|
color: new Types.Text(),
|
|
color: new Types.Text(),
|
|
fontSize: new Types.Integer().default(22)
|
|
fontSize: new Types.Integer().default(22)
|
|
}
|
|
}
|