@janiscommerce/ui-native
Version:
components library for Janis app
14 lines (13 loc) • 453 B
JavaScript
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;