Skip to content

Instantly share code, notes, and snippets.

@jbmusso
Created June 16, 2015 16:37
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbmusso/896a389ba707fe583ddc to your computer and use it in GitHub Desktop.
Save jbmusso/896a389ba707fe583ddc to your computer and use it in GitHub Desktop.
'use strict';
import React from 'react';
export default class Clearfix extends React.Component {
render() {
const beforeStyle = {
display: 'table'
};
const afterStyle = {
...beforeStyle,
clear: 'both'
};
return (
<div {...this.props}>
<div style={beforeStyle}/>
{this.props.children}
<div style={afterStyle}/>
</div>
);
}
}
@iplus26
Copy link

iplus26 commented Sep 13, 2017

simple and good job! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment