mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-28 19:35:15 +00:00
27 lines
1.1 KiB
JavaScript
27 lines
1.1 KiB
JavaScript
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
var _excluded = ["bsPrefix", "variant", "animation", "size", "children", "as", "className"];
|
|
import classNames from 'classnames';
|
|
import React from 'react';
|
|
import { useBootstrapPrefix } from './ThemeProvider';
|
|
var Spinner = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
var bsPrefix = _ref.bsPrefix,
|
|
variant = _ref.variant,
|
|
animation = _ref.animation,
|
|
size = _ref.size,
|
|
children = _ref.children,
|
|
_ref$as = _ref.as,
|
|
Component = _ref$as === void 0 ? 'div' : _ref$as,
|
|
className = _ref.className,
|
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
|
|
bsPrefix = useBootstrapPrefix(bsPrefix, 'spinner');
|
|
var bsSpinnerPrefix = bsPrefix + "-" + animation;
|
|
return /*#__PURE__*/React.createElement(Component, _extends({
|
|
ref: ref
|
|
}, props, {
|
|
className: classNames(className, bsSpinnerPrefix, size && bsSpinnerPrefix + "-" + size, variant && "text-" + variant)
|
|
}), children);
|
|
});
|
|
Spinner.displayName = 'Spinner';
|
|
export default Spinner; |