@intility/bifrost-react
Version:
React library for Intility's design system, Bifrost.
29 lines (28 loc) • 913 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { forwardRef } from "react";
import classNames from "classnames";
import { bfSpinner } from "../../assets/bfSpinner.js";
import Icon from "./Icon.js";
/**
* Theme-colored spinner icon with customizable `size`. For more control use `<Icon />` instead.
* @example
* <Icon.Spinner size={64} />
* // is equivalent to
* <Icon
* icon={faSpinnerThird}
* className="bf-icon-spinner bfc-theme"
* style={{ fontSize: 64 }}
* />
*/ const IconSpinner = /*#__PURE__*/ forwardRef(({ size, ...props }, ref)=>{
return /*#__PURE__*/ _jsx(Icon, {
icon: bfSpinner,
ref: ref,
className: classNames("bf-icon-spinner bfc-theme", props.className),
style: {
...props.style,
fontSize: size ?? props.style?.fontSize
}
});
});
IconSpinner.displayName = "Icon.Spinner";
export default IconSpinner;