Skip to content

Instantly share code, notes, and snippets.

@cpv123
Created August 27, 2020 02:48
Show Gist options
  • Save cpv123/5e0515539e5d5bda8f4b99c63a05abd4 to your computer and use it in GitHub Desktop.
Save cpv123/5e0515539e5d5bda8f4b99c63a05abd4 to your computer and use it in GitHub Desktop.
import { ThemeProvider } from 'styled-components';
const theme = {
primary: PRIMARY_COLOR,
error: ERROR_COLOR,
};
return (
<ThemeProvider theme={theme}>
<App />
</ThemeProvider>
);
...
// usage in a styled-component
const StyledTitle = styled.h1`
font-size: 1.5em;
text-align: center;
color: ${props => props.primary};
`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment