import * as React from 'react'; import { View, Text, ViewStyle, TextStyle } from 'react-native'; export interface NodeProps { style?: ViewStyle | TextStyle | any[]; numberOfLines?: number; children?: React.ReactNode; onLayout?: (e: any) => void; onStartShouldSetResponderCapture?: () => boolean; } const Node: React.FC = props => { const { style, numberOfLines, children, onLayout, onStartShouldSetResponderCapture } = props; if (children === undefined || children === null) { return {null}; } if (typeof children === 'string' || typeof children === 'number') { return ( {children} ); } return ( {children} ); }; export default Node;