Last active
August 2, 2022 21:10
-
-
Save juunegreiros/0ff8f3b1d2aba19062f2cfd7eda606a7 to your computer and use it in GitHub Desktop.
Styled component example
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
export const Title = styled.h1` | |
color: red; | |
margin: 1px; | |
` | |
const TitleVariant = styled.h1<{ banana: string }>` | |
color: ${({ banana }) => banana}; | |
margin: 0; | |
line-height: 1.15; | |
font-size: 4rem; | |
text-align: center; | |
text-decoration: none; | |
`; | |
export const ButtonRed = styled.button<{variant?: string}>(({ variant }) => ` | |
color: ${variant || 'red'}; | |
`) | |
export const ButtonRed2 = styled(ButtonRed)` | |
background-color: purple; | |
`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment