Created
August 27, 2020 02:48
-
-
Save cpv123/5e0515539e5d5bda8f4b99c63a05abd4 to your computer and use it in GitHub Desktop.
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 { 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