Created
January 6, 2020 12:24
-
-
Save kennethlynne/9841cbb34b7fc2039b335d698d359bc0 to your computer and use it in GitHub Desktop.
Label.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import styled from 'styled-components/native'; | |
import { Typography } from '~styles'; | |
export type LabelProps = { | |
children: React.ReactChild; | |
color?: string; | |
}; | |
const StyledLabel = styled.Text` | |
${Typography.primary}; | |
color: ${(props: LabelProps) => props.color || 'black'}; | |
`; | |
export const Label = (props: LabelProps) => <StyledLabel>{props.children}</StyledLabel> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment