UNPKG

1.36 kBJavaScriptView Raw
1import _extends from 'babel-runtime/helpers/extends';
2import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
3import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
4import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
5import _inherits from 'babel-runtime/helpers/inherits';
6import classNames from 'classnames';
7import React from 'react';
8
9import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
10
11var ButtonToolbar = function (_React$Component) {
12 _inherits(ButtonToolbar, _React$Component);
13
14 function ButtonToolbar() {
15 _classCallCheck(this, ButtonToolbar);
16
17 return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
18 }
19
20 ButtonToolbar.prototype.render = function render() {
21 var _props = this.props,
22 className = _props.className,
23 props = _objectWithoutProperties(_props, ['className']);
24
25 var _splitBsProps = splitBsProps(props),
26 bsProps = _splitBsProps[0],
27 elementProps = _splitBsProps[1];
28
29 var classes = getClassSet(bsProps);
30
31 return React.createElement('div', _extends({}, elementProps, {
32 role: 'toolbar',
33 className: classNames(className, classes)
34 }));
35 };
36
37 return ButtonToolbar;
38}(React.Component);
39
40export default bsClass('btn-toolbar', ButtonToolbar);
\No newline at end of file