UNPKG

@intility/bifrost-react

Version:

React library for Intility's design system, Bifrost.

42 lines 1.03 kB
import { c as _c } from "react-compiler-runtime"; import classNames from "classnames"; import { faAngleRight } from "@fortawesome/free-solid-svg-icons/faAngleRight"; import Icon from "../../Icon/Icon.js"; import { jsx as _jsx } from "react/jsx-runtime"; export default function ExpandIcon(t0) { const $ = _c(6); const { open: t1, iconProps } = t0; const open = t1 === undefined ? false : t1; const t2 = iconProps?.className; let t3; if ($[0] !== open || $[1] !== t2) { t3 = classNames("bf-expand-icon bf-neutral-link", t2, { "bf-expand-icon-open": open }); $[0] = open; $[1] = t2; $[2] = t3; } else { t3 = $[2]; } let t4; if ($[3] !== iconProps || $[4] !== t3) { t4 = /*#__PURE__*/_jsx("div", { className: "bf-expand-icon-wrapper", children: /*#__PURE__*/_jsx(Icon, { icon: faAngleRight, ...iconProps, className: t3 }) }); $[3] = iconProps; $[4] = t3; $[5] = t4; } else { t4 = $[5]; } return t4; }