import React from 'react'; import { Text, StyleSheet } from 'react-native'; import PropTypes from 'prop-types'; import { Typography, FontWeight } from '../../config/typography'; import Tag from '../Tag'; export default function CustomText(props) { const { //props style header, title1, title2, title3, headline, body1, body2, callout, subhead, footnote, caption1, caption2, overline, // props font thin, ultraLight, light, regular, medium, semibold, bold, heavy, black, //numberOfLines numberOfLines, textAlign, //custom style, //children children, } = props; return ( {children} ); } // Define typechecking CustomText.propTypes = { //define style header: PropTypes.bool, title1: PropTypes.bool, title2: PropTypes.bool, title3: PropTypes.bool, headline: PropTypes.bool, body1: PropTypes.bool, body2: PropTypes.bool, callout: PropTypes.bool, subhead: PropTypes.bool, footnote: PropTypes.bool, caption1: PropTypes.bool, caption2: PropTypes.bool, overline: PropTypes.bool, //define font custom thin: PropTypes.bool, ultraLight: PropTypes.bool, light: PropTypes.bool, regular: PropTypes.bool, medium: PropTypes.bool, semibold: PropTypes.bool, bold: PropTypes.bool, heavy: PropTypes.bool, black: PropTypes.bool, //numberOfLines numberOfLines: PropTypes.number, textAlign: PropTypes.string, //custom style style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), children: PropTypes.node, // plain text }; CustomText.defaultProps = { //props for style header: false, title1: false, title2: false, title3: false, headline: false, body1: false, body2: false, callout: false, subhead: false, footnote: false, caption1: false, caption2: false, overline: false, //props for font thin: false, ultraLight: false, light: false, regular: false, medium: false, semibold: false, bold: false, heavy: false, black: false, //numberOfLines numberOfLines: 10, textAlign: 'left', //custom style style: {}, children: '', };