Last active
June 18, 2018 03:36
-
-
Save srph/65b115b8f07c167ce6786443489a325e to your computer and use it in GitHub Desktop.
JS: Organizing styled-components
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
const styling = { | |
Container: style.div` | |
padding: 16px; | |
${props => props.isBig && css` | |
padding: 32px; | |
`} | |
`, | |
Heading: styled.div` | |
display: flex; | |
`, | |
HeadingButton: styled.div` | |
margin-left: auto; | |
` | |
} | |
const Card = <styling.Container> | |
<styling.Heading> | |
<styling.HeadingButton> | |
<button /> | |
</styling.HeadingButton> | |
</syling.Heading> | |
</styling.Container> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment