UNPKG

@adaptui/react

Version:

Collection of headless components/hooks that are accessible, composable, customizable from low level to build your own UI & Design System powered by Reakit

10 lines (9 loc) 560 B
import { createStoreContext } from "ariakit-utils/store"; export var AccordionContext = createStoreContext(); export var getSelectedId = (state, id) => { var _state$selectedId; if (!id) return; if (state !== null && state !== void 0 && state.allowMultiple) return state === null || state === void 0 ? void 0 : (_state$selectedId = state.selectedId) === null || _state$selectedId === void 0 ? void 0 : _state$selectedId.includes(id); return (state === null || state === void 0 ? void 0 : state.selectedId) === id; }; //# sourceMappingURL=__utils.js.map