UNPKG

1.35 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 InputGroupButton = function (_React$Component) {
12 _inherits(InputGroupButton, _React$Component);
13
14 function InputGroupButton() {
15 _classCallCheck(this, InputGroupButton);
16
17 return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
18 }
19
20 InputGroupButton.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('span', _extends({}, elementProps, { className: classNames(className, classes) }));
32 };
33
34 return InputGroupButton;
35}(React.Component);
36
37export default bsClass('input-group-btn', InputGroupButton);
\No newline at end of file