UNPKG

react-native-template-agile-rn

Version:

<h3 align="center"> <b>Agile RN</b> is a <b>React Native ⚛ template</b> that was created to <i>speed up project start-up</i> as well as make <i>app development easier</i>. <h3>

29 lines (22 loc) 635 B
import styled from 'styled-components/native'; import { colors } from '~/styles'; const Text = styled.Text` color: ${props => color(props)}; font-size: ${props => size(props)}px; font-weight: ${props => (props.bold ? 'bold' : 'normal')}; `; function color(props) { if (props.grey) return colors.grey; if (props.grey2) return colors.grey2; if (props.grey3) return colors.grey3; if (props.color) return props.color; return colors.dark; } function size(props) { if (props.h1) return 42; if (props.h2) return 36; if (props.h3) return 28; if (props.size) return props.size; return 16; } export default Text;