UNPKG

@intility/bifrost-react

Version:

React library for Intility's design system, Bifrost.

93 lines 2.07 kB
import { c as _c } from "react-compiler-runtime"; import { forwardRef } from "react"; import classNames from "classnames"; import { faCheck } from "@fortawesome/free-solid-svg-icons/faCheck"; import Icon from "../Icon/Icon.js"; import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; const StepBarItem = /*#__PURE__*/forwardRef((t0, ref) => { const $ = _c(17); let active; let children; let className; let props; if ($[0] !== t0) { ({ active, children, className, ...props } = t0); $[0] = t0; $[1] = active; $[2] = children; $[3] = className; $[4] = props; } else { active = $[1]; children = $[2]; className = $[3]; props = $[4]; } let t1; if ($[5] !== active || $[6] !== className) { t1 = classNames("bf-stepbar-item", className, { "bf-stepbar-item-active": active }); $[5] = active; $[6] = className; $[7] = t1; } else { t1 = $[7]; } let t2; if ($[8] !== children) { t2 = /*#__PURE__*/_jsx("span", { className: "bf-stepbar-content", children: children }); $[8] = children; $[9] = t2; } else { t2 = $[9]; } let t3; if ($[10] === Symbol.for("react.memo_cache_sentinel")) { t3 = /*#__PURE__*/_jsx("span", { className: "bf-stepbar-counter" }); $[10] = t3; } else { t3 = $[10]; } let t4; if ($[11] === Symbol.for("react.memo_cache_sentinel")) { t4 = /*#__PURE__*/_jsx("span", { className: "bf-stepbar-circle-icon", children: /*#__PURE__*/_jsx(Icon, { icon: faCheck }) }); $[11] = t4; } else { t4 = $[11]; } let t5; if ($[12] !== props || $[13] !== ref || $[14] !== t1 || $[15] !== t2) { t5 = /*#__PURE__*/_jsxs("div", { ref: ref, className: t1, ...props, children: [t2, t3, t4] }); $[12] = props; $[13] = ref; $[14] = t1; $[15] = t2; $[16] = t5; } else { t5 = $[16]; } return t5; }); StepBarItem.displayName = "StepBar.Item"; export default StepBarItem;