UNPKG

1.48 kBJavaScriptView Raw
1import _extends from "@babel/runtime-corejs2/helpers/esm/extends";
2import _objectWithoutPropertiesLoose from "@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose";
3import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
4import classNames from 'classnames';
5import React from 'react';
6import InputGroupAddon from './InputGroupAddon';
7import InputGroupButton from './InputGroupButton';
8import { bsClass, bsSizes, getClassSet, splitBsProps } from './utils/bootstrapUtils';
9import { Size } from './utils/StyleConfig';
10
11var InputGroup =
12/*#__PURE__*/
13function (_React$Component) {
14 _inheritsLoose(InputGroup, _React$Component);
15
16 function InputGroup() {
17 return _React$Component.apply(this, arguments) || this;
18 }
19
20 var _proto = InputGroup.prototype;
21
22 _proto.render = function render() {
23 var _this$props = this.props,
24 className = _this$props.className,
25 props = _objectWithoutPropertiesLoose(_this$props, ["className"]);
26
27 var _splitBsProps = splitBsProps(props),
28 bsProps = _splitBsProps[0],
29 elementProps = _splitBsProps[1];
30
31 var classes = getClassSet(bsProps);
32 return React.createElement("span", _extends({}, elementProps, {
33 className: classNames(className, classes)
34 }));
35 };
36
37 return InputGroup;
38}(React.Component);
39
40InputGroup.Addon = InputGroupAddon;
41InputGroup.Button = InputGroupButton;
42export default bsClass('input-group', bsSizes([Size.LARGE, Size.SMALL], InputGroup));
\No newline at end of file