Created
May 28, 2019 21:34
-
-
Save jepser/1ba2f6cde3a9ae7ad03c06ac38921c44 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
const baseStyles = ({ top, left, right, bottom }) => css` | |
margin-top: ${top ? unitizedPx(top) : null}; | |
margin-right: ${right ? unitizedPx(right) : null}; | |
margin-bottom: ${bottom ? unitizedPx(bottom) : null}; | |
margin-left: ${left ? unitizedPx(left) : null}; | |
`; | |
const responsiveStyles = generateResponsiveStyles(baseStyles); | |
export const Root = styled.div` | |
display: ${props => (props.inline ? 'inline-block' : 'block')}; | |
${baseStyles} | |
${responsiveStyles} | |
} | |
`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment