1 | import _extends from 'babel-runtime/helpers/extends';
|
2 | import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
|
3 | import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
|
4 | import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
|
5 | import _inherits from 'babel-runtime/helpers/inherits';
|
6 | import classNames from 'classnames';
|
7 | import React from 'react';
|
8 |
|
9 | import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
|
10 |
|
11 | var InputGroupAddon = function (_React$Component) {
|
12 | _inherits(InputGroupAddon, _React$Component);
|
13 |
|
14 | function InputGroupAddon() {
|
15 | _classCallCheck(this, InputGroupAddon);
|
16 |
|
17 | return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
18 | }
|
19 |
|
20 | InputGroupAddon.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 InputGroupAddon;
|
35 | }(React.Component);
|
36 |
|
37 | export default bsClass('input-group-addon', InputGroupAddon); |
\ | No newline at end of file |