import * as React from 'react'; import { Text } from 'react-native'; import useStyles from './styles'; import { TypographyProps } from './types'; const Typography: React.FC = ({ as, children, color, fontSize, fontType, fontWeight, lineClamp, overflow, style, ...props }) => { const styles = useStyles({ color, fontSize, fontType, fontWeight, lineClamp, overflow }); switch (as) { case 'p': return ( {children} ); case 'span': return ( {children} ); default: return ( {children} ); } }; export default Typography;