UNPKG

braid-design-system

Version:
40 lines (39 loc) 936 B
import { jsx } from "react/jsx-runtime"; import { useFallbackState } from "../../playroom/playroomState.mjs"; import { AccordionItem as AccordionItem$1 } from "./AccordionItem.mjs"; const AccordionItem = ({ label, stateName, expanded, onToggle, size, tone, weight, badge, icon, ...restProps }) => { const [state, handleChange] = useFallbackState( stateName, expanded, onToggle, false ); return /* @__PURE__ */ jsx( AccordionItem$1, { 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 } ); }; export { AccordionItem };