@cerberus-design/react
Version:
The Cerberus Design React component library.
18 lines (13 loc) • 804 B
JavaScript
'use client';
;
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const jsxRuntime = require('react/jsx-runtime');
const cerberus = require('../../context/cerberus.cjs');
const show = require('../show/show.cjs');
const parts = require('./parts.cjs');
function CheckboxIcon(props) {
const { icons } = cerberus.useCerberusContext();
const { checkbox: CheckIcon, indeterminate: IndeterminateIcon } = icons;
return /* @__PURE__ */ jsxRuntime.jsx(parts.CheckboxParts.Indicator, { indeterminate: props.indeterminate, children: /* @__PURE__ */ jsxRuntime.jsx(show.Show, { when: props.indeterminate, fallback: /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, {}), children: /* @__PURE__ */ jsxRuntime.jsx(IndeterminateIcon, {}) }) });
}
exports.CheckboxIcon = CheckboxIcon;