123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- import React from 'react';
- import Module from '../../lib/Module';
- import {StyleSheet ,TextInput, View, Text } from 'react-native';
- import Types from '../../lib/Types';
- export default class TextComp extends Module {
- constructor(props) {
- super(props);
- this.state = {
- text: props.text || ""
- }
- console.log("Look at me now")
- console.log(this)
- if(this.props.CoreSystem){
- //console.log(this.props.CoreSystem.ViewSystem.getChildren(this))
- }
- }
- display() {
- let {
- text,
- color,
- fontSize,
- fontFamily,
- textAlign
- } = this.props;
- return (
- <View>
- <Text style={{color, fontSize,fontFamily,textAlign}}>
- {text}
- </Text>
- {this.props.children}
- </View>)
- }
- }
- TextComp.Inputs = {
- text: new Types.Text().default("Enter Text"),
- color: new Types.Text(),
- fontSize: new Types.Integer().default(22),
- fontFamily: new Types.Text(),
- textAlign: new Types.Text()
- }
|