UNPKG

1.25 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 { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
7
8var InputGroupAddon =
9/*#__PURE__*/
10function (_React$Component) {
11 _inheritsLoose(InputGroupAddon, _React$Component);
12
13 function InputGroupAddon() {
14 return _React$Component.apply(this, arguments) || this;
15 }
16
17 var _proto = InputGroupAddon.prototype;
18
19 _proto.render = function render() {
20 var _this$props = this.props,
21 className = _this$props.className,
22 props = _objectWithoutPropertiesLoose(_this$props, ["className"]);
23
24 var _splitBsProps = splitBsProps(props),
25 bsProps = _splitBsProps[0],
26 elementProps = _splitBsProps[1];
27
28 var classes = getClassSet(bsProps);
29 return React.createElement("span", _extends({}, elementProps, {
30 className: classNames(className, classes)
31 }));
32 };
33
34 return InputGroupAddon;
35}(React.Component);
36
37export default bsClass('input-group-addon', InputGroupAddon);
\No newline at end of file