1 | import _extends from "@babel/runtime-corejs2/helpers/esm/extends";
|
2 | import _objectWithoutPropertiesLoose from "@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose";
|
3 | import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
|
4 | import classNames from 'classnames';
|
5 | import React from 'react';
|
6 | import PropTypes from 'prop-types';
|
7 | import { bsClass, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';
|
8 | var propTypes = {
|
9 | |
10 |
|
11 |
|
12 | glyph: PropTypes.string.isRequired
|
13 | };
|
14 |
|
15 | var Glyphicon =
|
16 |
|
17 | function (_React$Component) {
|
18 | _inheritsLoose(Glyphicon, _React$Component);
|
19 |
|
20 | function Glyphicon() {
|
21 | return _React$Component.apply(this, arguments) || this;
|
22 | }
|
23 |
|
24 | var _proto = Glyphicon.prototype;
|
25 |
|
26 | _proto.render = function render() {
|
27 | var _extends2;
|
28 |
|
29 | var _this$props = this.props,
|
30 | glyph = _this$props.glyph,
|
31 | className = _this$props.className,
|
32 | props = _objectWithoutPropertiesLoose(_this$props, ["glyph", "className"]);
|
33 |
|
34 | var _splitBsProps = splitBsProps(props),
|
35 | bsProps = _splitBsProps[0],
|
36 | elementProps = _splitBsProps[1];
|
37 |
|
38 | var classes = _extends({}, getClassSet(bsProps), (_extends2 = {}, _extends2[prefix(bsProps, glyph)] = true, _extends2));
|
39 |
|
40 | return React.createElement("span", _extends({}, elementProps, {
|
41 | className: classNames(className, classes)
|
42 | }));
|
43 | };
|
44 |
|
45 | return Glyphicon;
|
46 | }(React.Component);
|
47 |
|
48 | Glyphicon.propTypes = propTypes;
|
49 | export default bsClass('glyphicon', Glyphicon); |
\ | No newline at end of file |