license import React from 'react' ; import { Text as RNText , TextProps as RNTextProps , } from 'react-native' ; import { EvaStatus , Overwrite , LiteralUnion , } from '../../devsupport' ; import { styled , StyledComponentProps , } from '../../theme' ; type TextStyledProps = Overwrite < StyledComponentProps , { appearance ? : LiteralUnion < 'default' | 'alternative' | 'hint' > ; } > ; type ChildElement = React . ReactText | TextElement ; export interface TextProps extends RNTextProps , TextStyledProps { children ? : ChildElement | ChildElement [ ] ; category ? : LiteralUnion < 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 's1' | 's2' | 'p1' | 'p2' | 'c1' | 'c2' | 'label' > ; status ? : EvaStatus ; } export type TextElement = React . ReactElement < TextProps > ; extends React . Component property property property property property overview-example overview-example overview-example overview-example @ styled ( 'Text' ) export class Text extends React . Component < TextProps > { public render ( ) { const { eva , style , ... textProps } = this . props ; return ( < RNText { ... textProps } style = { [ eva . style , style ] } / > ) ; } }