UNPKG

@workday/canvas-kit-labs-react

Version:

Canvas Kit Labs is an incubator for new and experimental components. Since we have a rather rigorous process for getting components in at a production level, it can be valuable to make them available earlier while we continuously iterate on the API/functi

23 lines (22 loc) 688 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.useExpandableModel = void 0; const common_1 = require("@workday/canvas-kit-react/common"); const disclosure_1 = require("@workday/canvas-kit-react/disclosure"); /** * The `ExpandableModel` extends the `DisclosureModel` */ exports.useExpandableModel = (0, common_1.createModelHook)({ defaultConfig: { ...disclosure_1.useDisclosureModel.defaultConfig, }, })(config => { const disclosure = (0, disclosure_1.useDisclosureModel)(config); const state = { ...disclosure.state, }; const events = { ...disclosure.events, }; return { state, events }; });