UNPKG

@intility/bifrost-react

Version:

React library for Intility's design system, Bifrost.

90 lines 2.61 kB
import { c as _c } from "react-compiler-runtime"; import { faCircle } from "@fortawesome/free-regular-svg-icons/faCircle"; import { faSquare } from "@fortawesome/free-regular-svg-icons/faSquare"; import { faSquareCheck } from "@fortawesome/free-solid-svg-icons/faSquareCheck"; import { faCircleDot } from "@fortawesome/free-solid-svg-icons/faCircleDot"; import { faCheck } from "@fortawesome/free-solid-svg-icons/faCheck"; import bfIndeterminate from "../../assets/bfIndeterminate.js"; import Icon from "../Icon/Icon.js"; import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; const CheckboxIcon = t0 => { const $ = _c(4); const { type, indeterminate } = t0; if (indeterminate) { let t1; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { t1 = /*#__PURE__*/_jsx("span", { className: "bf-checkbox-icon", children: /*#__PURE__*/_jsx(Icon, { className: "bf-checkbox-indeterminate", icon: bfIndeterminate }) }); $[0] = t1; } else { t1 = $[0]; } return t1; } if (type === "switch") { let t1; if ($[1] === Symbol.for("react.memo_cache_sentinel")) { t1 = /*#__PURE__*/_jsx("span", { className: "bf-switch", children: /*#__PURE__*/_jsxs("span", { className: "bf-switch-thumb", children: [/*#__PURE__*/_jsx(Icon, { className: "bf-checkbox-checked", icon: faCheck }), /*#__PURE__*/_jsx("span", { className: "bf-checkbox-unchecked" })] }) }); $[1] = t1; } else { t1 = $[1]; } return t1; } if (type === "radio") { let t1; if ($[2] === Symbol.for("react.memo_cache_sentinel")) { t1 = /*#__PURE__*/_jsxs("span", { className: "bf-checkbox-icon", children: [/*#__PURE__*/_jsx(Icon, { className: "bf-checkbox-checked", icon: faCircleDot }), /*#__PURE__*/_jsx(Icon, { className: "bf-checkbox-unchecked", icon: faCircle })] }); $[2] = t1; } else { t1 = $[2]; } return t1; } let t1; if ($[3] === Symbol.for("react.memo_cache_sentinel")) { t1 = /*#__PURE__*/_jsxs("span", { className: "bf-checkbox-icon", children: [/*#__PURE__*/_jsx(Icon, { className: "bf-checkbox-checked", icon: faSquareCheck }), /*#__PURE__*/_jsx(Icon, { className: "bf-checkbox-unchecked", icon: faSquare })] }); $[3] = t1; } else { t1 = $[3]; } return t1; }; export default CheckboxIcon;