UNPKG

@intility/bifrost-react

Version:

React library for Intility's design system, Bifrost.

63 lines (62 loc) 1.49 kB
import { c as _c } from "react-compiler-runtime"; import { forwardRef } from "react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import classNames from "classnames"; // using `interface` lets PropsDoc generate props table correctly while also // allowing us to override the `fixedWidth` with a deprecation import { jsx as _jsx } from "react/jsx-runtime"; const Icon = /*#__PURE__*/forwardRef((t0, ref) => { const $ = _c(13); let className; let marginLeft; let marginRight; let props; if ($[0] !== t0) { ({ marginLeft, marginRight, className, ...props } = t0); $[0] = t0; $[1] = className; $[2] = marginLeft; $[3] = marginRight; $[4] = props; } else { className = $[1]; marginLeft = $[2]; marginRight = $[3]; props = $[4]; } let t1; if ($[5] !== className || $[6] !== marginLeft || $[7] !== marginRight) { t1 = classNames(className, { "bf-icon-margin-left": marginLeft, "bf-icon-margin-right": marginRight }); $[5] = className; $[6] = marginLeft; $[7] = marginRight; $[8] = t1; } else { t1 = $[8]; } let t2; if ($[9] !== props || $[10] !== ref || $[11] !== t1) { t2 = /*#__PURE__*/_jsx(FontAwesomeIcon, { ref: ref, ...props, className: t1 }); $[9] = props; $[10] = ref; $[11] = t1; $[12] = t2; } else { t2 = $[12]; } return t2; }); Icon.displayName = "Icon"; export default Icon;