@cerberus-design/react
Version:
The Cerberus Design React component library.
21 lines (16 loc) • 768 B
JavaScript
'use client';
;
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const jsxRuntime = require('react/jsx-runtime');
const cerberus = require('../../context/cerberus.cjs');
const parts = require('./parts.cjs');
function Option(props) {
const { item, ...itemProps } = props;
const { icons } = cerberus.useCerberusContext();
const { selectChecked: CheckedIcon } = icons;
return /* @__PURE__ */ jsxRuntime.jsxs(parts.SelectParts.Item, { ...itemProps, item, children: [
/* @__PURE__ */ jsxRuntime.jsx(parts.SelectParts.ItemText, { children: item?.label }),
/* @__PURE__ */ jsxRuntime.jsx(parts.SelectParts.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(CheckedIcon, {}) })
] });
}
exports.Option = Option;