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