Created
April 17, 2019 11:43
-
-
Save mrcthms/6b75c5e3a05790d9ed02df90667385d8 to your computer and use it in GitHub Desktop.
Local panel component
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
import React from 'react' | |
import { Root } from './styles' | |
export default ({ withPadding, children, ...props }) => ( | |
<Root {...props} withPadding={withPadding}>{children}</Root> | |
) |
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
import styled from 'react-emotion' | |
export const Root = styled.div` | |
${({ theme, withPadding }) => ` | |
border-radius: ${theme.radii.rounded}; | |
padding: ${withPadding ? theme.spacing.l : 0}; | |
// Change this to whichever color you need! | |
background: ${theme.palette.structure.white}; | |
box-shadow: ${theme.elevations.low}; | |
`}; | |
` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment