diff --git a/code/addons/controls/src/ControlsPanel.tsx b/code/addons/controls/src/ControlsPanel.tsx index c87d074035b7..20d3e695c2bd 100644 --- a/code/addons/controls/src/ControlsPanel.tsx +++ b/code/addons/controls/src/ControlsPanel.tsx @@ -34,7 +34,7 @@ interface ControlsParameters { sort?: SortType; expanded?: boolean; presetColors?: PresetColor[]; - disableSave?: boolean; + disableSaveFromUI?: boolean; } interface ControlsPanelProps { @@ -51,7 +51,7 @@ export const ControlsPanel = ({ saveStory, createStory }: ControlsPanelProps) => expanded, sort, presetColors, - disableSave = false, + disableSaveFromUI = false, } = useParameter(PARAM_KEY, {}); const { path, previewInitialized } = useStorybookState(); @@ -93,7 +93,7 @@ export const ControlsPanel = ({ saveStory, createStory }: ControlsPanelProps) => {hasControls && hasUpdatedArgs && global.CONFIG_TYPE === 'DEVELOPMENT' && - disableSave !== true && } + disableSaveFromUI !== true && } ); }; diff --git a/docs/essentials/controls.mdx b/docs/essentials/controls.mdx index 2f465d603083..9066e7e4dc63 100644 --- a/docs/essentials/controls.mdx +++ b/docs/essentials/controls.mdx @@ -262,7 +262,7 @@ You can also update a control's value, then save the changes to the story. The s ### Disable creating and editing of stories -If you don't want to allow the creation or editing of stories from the Controls panel, you can disable this feature by setting the `disableSave` parameter to `true` in the `parameters.controls` parameter in your `.storybook/preview.js` file. +If you don't want to allow the creation or editing of stories from the Controls panel, you can disable this feature by setting the `disableSaveFromUI` parameter to `true` in the `parameters.controls` parameter in your `.storybook/preview.js` file. ## Configuration @@ -489,7 +489,7 @@ Specifies how the controls are sorted. * **alpha**: Sorted alphabetically, by the arg type's name * **requiredFirst**: Same as `alpha`, with any required arg types displayed first -#### `disableSave` +#### `disableSaveFromUI` Type: `boolean`