import * as React from 'react'; import { Text, ViewStyle, TextStyle } from 'react-native'; import Node from '../node'; import styles from './style'; const prefixCls = 'form-value'; export interface FormValueProps { placeholder?: string; textAlign?: 'left' | 'right' | 'center'; children?: React.ReactNode; style?: ViewStyle | TextStyle; placeholderStyle?: TextStyle; } const FormValue: React.FC = props => { const { placeholder, textAlign = 'left', style, placeholderStyle, children } = props; return children || children === 0 ? ( {children} ) : ( {placeholder} ); }; export default FormValue;