Created
January 15, 2020 14:36
-
-
Save ivanmalagon/6c2e4d29aa70e9d4746c42104bed1945 to your computer and use it in GitHub Desktop.
Styled Components TIps
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
Props tips | |
https://codesandbox.io/s/sc-props-ppsij | |
const Paragraph2 = styled.p( | |
props => css` | |
width: 400px; | |
margin: auto; | |
/* props can be accessed from the above props */ | |
color: ${props.color}; | |
background: ${props.background}; | |
margin-bottom: 24px; | |
padding: 12px; | |
` | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment