@storybook/addon-docs
Version:
Storybook Docs: Document UI components automatically with stories and MDX
14 lines (12 loc) • 398 B
JavaScript
// src/blocks/controls/helpers.ts
var getControlId = (value, storyId) => {
let base = value.replace(/\s+/g, "-");
return storyId ? `control-${storyId}-${base}` : `control-${base}`;
}, getControlSetterButtonId = (value, storyId) => {
let base = value.replace(/\s+/g, "-");
return storyId ? `set-${storyId}-${base}` : `set-${base}`;
};
export {
getControlId,
getControlSetterButtonId
};