braid-design-system
Version:
Themeable design system for the SEEK Group
39 lines (38 loc) • 1.08 kB
JavaScript
const jsxRuntime = require("react/jsx-runtime");
const lib_playroom_playroomState_cjs = require("../../playroom/playroomState.cjs");
const lib_components_Accordion_AccordionItem_cjs = require("./AccordionItem.cjs");
const AccordionItem = ({
label,
stateName,
expanded,
onToggle,
size,
tone,
weight,
badge,
icon,
...restProps
}) => {
const [state, handleChange] = lib_playroom_playroomState_cjs.useFallbackState(
stateName,
expanded,
onToggle,
false
);
return /* @__PURE__ */ jsxRuntime.jsx(
lib_components_Accordion_AccordionItem_cjs.AccordionItem,
{
expanded: state,
onToggle: handleChange,
label: typeof label !== "boolean" ? label : "",
size: typeof size === "boolean" ? void 0 : size,
tone: typeof tone === "boolean" ? void 0 : tone,
weight: typeof weight === "boolean" ? void 0 : weight,
badge: typeof badge === "boolean" ? void 0 : badge,
icon: typeof icon === "boolean" ? void 0 : icon,
...restProps
}
);
};
exports.AccordionItem = AccordionItem;
;