import React, { forwardRef } from 'react'; import { Text } from 'react-native'; import isNumber from 'lodash-es/isNumber'; import { useTheme } from '../Theme'; import type { TypographyBaseProps } from './type'; import { getTypeStyle, getSizeStyle, getLevelStyle } from './style'; const Typography = forwardRef((props, ref) => { const { children, style, type, size = 'md', level = 4, renderType, center, strong, underline, disabled, delete: del, ellipsis, ...rest } = props; const theme = useTheme(); const isTitle = renderType === 'title'; const getNumberOfLines = () => { if (ellipsis === true) return 1; if (isNumber(ellipsis)) return ellipsis; return undefined; }; return ( {children} ); }); export default Typography;