UNPKG

@cerberus-design/react

Version:

The Cerberus Design React component library.

14 lines (11 loc) 643 B
'use client'; import { jsx } from 'react/jsx-runtime'; import { useCerberusContext } from '../../context/cerberus.js'; import { Show } from '../show/show.js'; import { CheckboxParts } from './parts.js'; function CheckboxIcon(props) { const { icons } = useCerberusContext(); const { checkbox: CheckIcon, indeterminate: IndeterminateIcon } = icons; return /* @__PURE__ */ jsx(CheckboxParts.Indicator, { indeterminate: props.indeterminate, children: /* @__PURE__ */ jsx(Show, { when: props.indeterminate, fallback: /* @__PURE__ */ jsx(CheckIcon, {}), children: /* @__PURE__ */ jsx(IndeterminateIcon, {}) }) }); } export { CheckboxIcon };