Created
November 9, 2022 17:41
-
-
Save BetterProgramming/f1fa8764aa27063accfb51ab624b9a71 to your computer and use it in GitHub Desktop.
This file contains hidden or 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'; | |
const StyledButton = styled(Button)` | |
color: ${({ theme }) => theme.colors.primary}; | |
`; | |
const primary = 'green'; | |
const theme = { | |
colors: { | |
primary, | |
} | |
} | |
import { ThemeProvider } from 'styled-components'; | |
const SubmitButton = () => { | |
return ( | |
<ThemeProvider theme={theme}> | |
<StyledButton>Themed Button</StyledButton> | |
</ThemeProvider> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment