mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 17:35:16 +00:00
28 lines
1.0 KiB
JavaScript
28 lines
1.0 KiB
JavaScript
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
var _excluded = ["bsPrefix", "variant", "pill", "className", "as"];
|
|
import classNames from 'classnames';
|
|
import React from 'react';
|
|
import { useBootstrapPrefix } from './ThemeProvider';
|
|
var defaultProps = {
|
|
pill: false
|
|
};
|
|
var Badge = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
var bsPrefix = _ref.bsPrefix,
|
|
variant = _ref.variant,
|
|
pill = _ref.pill,
|
|
className = _ref.className,
|
|
_ref$as = _ref.as,
|
|
Component = _ref$as === void 0 ? 'span' : _ref$as,
|
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
|
|
var prefix = useBootstrapPrefix(bsPrefix, 'badge');
|
|
return /*#__PURE__*/React.createElement(Component, _extends({
|
|
ref: ref
|
|
}, props, {
|
|
className: classNames(className, prefix, pill && prefix + "-pill", variant && prefix + "-" + variant)
|
|
}));
|
|
});
|
|
Badge.displayName = 'Badge';
|
|
Badge.defaultProps = defaultProps;
|
|
export default Badge; |