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 InputGroupAddon from './InputGroupAddon';
|
10 | import InputGroupButton from './InputGroupButton';
|
11 | import { bsClass, bsSizes, getClassSet, splitBsProps } from './utils/bootstrapUtils';
|
12 | import { Size } from './utils/StyleConfig';
|
13 |
|
14 | var InputGroup = function (_React$Component) {
|
15 | _inherits(InputGroup, _React$Component);
|
16 |
|
17 | function InputGroup() {
|
18 | _classCallCheck(this, InputGroup);
|
19 |
|
20 | return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
21 | }
|
22 |
|
23 | InputGroup.prototype.render = function render() {
|
24 | var _props = this.props,
|
25 | className = _props.className,
|
26 | props = _objectWithoutProperties(_props, ['className']);
|
27 |
|
28 | var _splitBsProps = splitBsProps(props),
|
29 | bsProps = _splitBsProps[0],
|
30 | elementProps = _splitBsProps[1];
|
31 |
|
32 | var classes = getClassSet(bsProps);
|
33 |
|
34 | return React.createElement('span', _extends({}, elementProps, { className: classNames(className, classes) }));
|
35 | };
|
36 |
|
37 | return InputGroup;
|
38 | }(React.Component);
|
39 |
|
40 | InputGroup.Addon = InputGroupAddon;
|
41 | InputGroup.Button = InputGroupButton;
|
42 |
|
43 | export default bsClass('input-group', bsSizes([Size.LARGE, Size.SMALL], InputGroup)); |
\ | No newline at end of file |