import React, {useState} from 'react';
import {Text, TextStyle, StyleSheet} from 'react-native';
import {$Colors} from './style';

export type TextProps = {
    color?: string;
    size?: number;
    children?: React.ReactText | React.ReactText[];
    style?: TextStyle | TextStyle[];
};

const TextCom: React.FC<TextProps> = ({color = $Colors.normalText, size = 14, style, children}) => {
    const styles = StyleSheet.create({
        font: {
            fontSize: size,
            color,
        },
    });
    return <Text style={[styles.font, style]}>{children}</Text>;
};
export default TextCom;
