UNPKG

@workday/canvas-kit-preview-react

Version:

Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.

25 lines (24 loc) 671 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.usePillModel = void 0; const common_1 = require("@workday/canvas-kit-react/common"); exports.usePillModel = (0, common_1.createModelHook)({ defaultConfig: { /** * Used to disable a pill and apply the correct styles. */ disabled: false, /** * ID used to add accessibility labels to pill elements. * @default `useUniqueId()` */ id: '', }, })(config => { const id = (0, common_1.useUniqueId)(config.id); const state = { ...config, id, }; return { state, events: {} }; });