Created
April 24, 2017 01:01
-
-
Save JonathanZWhite/02967408ddb3745873beec31d2537c3e to your computer and use it in GitHub Desktop.
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, { PropTypes } from 'react'; | |
import { spacing } from '../../base/spacing'; | |
function getSpacingSize(size) { | |
return `space${size}`; | |
} | |
function Spacing(props) { | |
return ( | |
<div style={{ marginBottom: spacing[getSpacingSize(props.size)] }}> | |
{props.children} | |
</div> | |
); | |
} | |
export default Spacing; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment