UNPKG

react-components-library

Version:
33 lines (24 loc) 781 B
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 'use strict'; var React = require('react'); var classNames = require('classnames'); var Container = React.createClass({ displayName: 'Container', render: function render() { return React.createElement( 'div', { className: this.getClass() }, this.props.children ); }, getClass: function getClass() { var classes = { 'container': true }; classes[this.props.className] = this.props.className; return classNames(classes); } }); module.exports = Container;