Last active
February 12, 2021 16:55
-
-
Save chetanraj/ea38c8a127534b819848af790251897d 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 styled from 'styled-components'; | |
import { border, color, compose, flexbox, layout, position, shadow, space, typography } from 'styled-system'; | |
export const Div = styled('div')( | |
compose(border, space, layout, typography, color, position, shadow, flexbox) | |
); | |
export const Flex = styled(Div)` | |
display: flex; | |
`; | |
export const Button = styled('button')( | |
compose(border, space, layout, typography, color, position, flexbox) | |
); | |
// and then extend the Button function to create multiple variants |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment