Skip to content

Instantly share code, notes, and snippets.



Created Aug 8, 2016
What would you like to do?
import React from 'react';
import cx from 'classnames';
export default function Spacing(Component) {
return (props) => {
const { spaceTop, spaceBottom } = props;
const classes = cx({
[`space-top-${spaceTop}`]: !!spaceTop,
[`space-${spaceBottom}`]: !!spaceBottom,
return (
<div className={classes}>
<Component {...props} />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.