2016-10-25 04:15:43 +03:00
|
|
|
/*
|
|
|
|
* based on
|
|
|
|
* https://github.com/roylee0704/react-flexbox-grid/blob/master/src/components/Grid.js
|
|
|
|
*/
|
|
|
|
|
2016-10-23 07:27:18 +03:00
|
|
|
const React = require('react');
|
2016-10-25 04:15:43 +03:00
|
|
|
const classNames = require('classnames');
|
|
|
|
const styles = require('./style.css');
|
|
|
|
|
|
|
|
const Container = module.exports = ({
|
|
|
|
fluid = false,
|
|
|
|
className,
|
|
|
|
children,
|
|
|
|
style
|
|
|
|
}) => {
|
|
|
|
const cn = classNames(
|
|
|
|
className,
|
|
|
|
styles[fluid ? 'container-fluid' : 'container']
|
|
|
|
);
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div style={style} className={cn}>
|
|
|
|
{children}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|
2016-10-23 07:27:18 +03:00
|
|
|
|
2016-10-25 04:15:43 +03:00
|
|
|
Container.propTypes = {
|
|
|
|
fluid: React.PropTypes.bool,
|
|
|
|
className: React.PropTypes.string,
|
|
|
|
style: React.PropTypes.object,
|
|
|
|
children: React.PropTypes.node
|
2016-10-23 07:27:18 +03:00
|
|
|
};
|