UNPKG

@janiscommerce/ui-native

Version:
14 lines (13 loc) 453 B
import React from 'react'; import { Text } from 'react-native'; import getStyleByTypography from './utils/getStyleByTypography'; const Typography = ({ children, style, type, size, color, ...props }) => { if (!children) { return null; } const typographyStyles = getStyleByTypography(type, size, color); return (<Text style={[style, typographyStyles.typography]} {...props}> {children} </Text>); }; export default Typography;