Skip to content

Instantly share code, notes, and snippets.

@kennethlynne
Created January 6, 2020 12:24
Show Gist options
  • Save kennethlynne/9841cbb34b7fc2039b335d698d359bc0 to your computer and use it in GitHub Desktop.
Save kennethlynne/9841cbb34b7fc2039b335d698d359bc0 to your computer and use it in GitHub Desktop.
Label.tsx
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