UNPKG

@intility/bifrost-react

Version:

React library for Intility's design system, Bifrost.

32 lines (31 loc) 1.04 kB
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 /> * // is equivalent to * <Icon icon={faSpinnerThird} className="bf-icon-spinner bfc-theme" /> * @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, style, className, ...props }, ref)=>/*#__PURE__*/ _jsx(Icon, { icon: bfSpinner, ...props, ref: ref, className: classNames("bf-icon-spinner", "bfc-theme", className), style: { ...style, fontSize: size ?? style?.fontSize } })); IconSpinner.displayName = "Icon.Spinner"; export default IconSpinner;