@talend/react-bootstrap
Version:
Bootstrap 3 components built with React
39 lines (38 loc) • 1.33 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _classnames = _interopRequireDefault(require("classnames"));
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _bootstrapUtils = require("./utils/bootstrapUtils");
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const propTypes = {
/**
* An icon name without "glyphicon-" prefix. See e.g. http://getbootstrap.com/components/#glyphicons
*/
glyph: _propTypes.default.string.isRequired
};
class Glyphicon extends _react.default.Component {
render() {
const {
glyph,
className,
...props
} = this.props;
const [bsProps, elementProps] = (0, _bootstrapUtils.splitBsProps)(props);
const classes = {
...(0, _bootstrapUtils.getClassSet)(bsProps),
[(0, _bootstrapUtils.prefix)(bsProps, glyph)]: true
};
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
...elementProps,
className: (0, _classnames.default)(className, classes)
});
}
}
Glyphicon.propTypes = propTypes;
var _default = exports.default = (0, _bootstrapUtils.bsClass)('glyphicon', Glyphicon);
//# sourceMappingURL=Glyphicon.js.map