Skip to content

Commit 7452e1e

Browse files
Rename disableSave to disableSaveFromUI in ControlsPanel
1 parent cc0f779 commit 7452e1e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

code/addons/controls/src/ControlsPanel.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ interface ControlsParameters {
3434
sort?: SortType;
3535
expanded?: boolean;
3636
presetColors?: PresetColor[];
37-
disableSave?: boolean;
37+
disableSaveFromUI?: boolean;
3838
}
3939

4040
interface ControlsPanelProps {
@@ -51,7 +51,7 @@ export const ControlsPanel = ({ saveStory, createStory }: ControlsPanelProps) =>
5151
expanded,
5252
sort,
5353
presetColors,
54-
disableSave = false,
54+
disableSaveFromUI = false,
5555
} = useParameter<ControlsParameters>(PARAM_KEY, {});
5656
const { path, previewInitialized } = useStorybookState();
5757

@@ -93,7 +93,7 @@ export const ControlsPanel = ({ saveStory, createStory }: ControlsPanelProps) =>
9393
{hasControls &&
9494
hasUpdatedArgs &&
9595
global.CONFIG_TYPE === 'DEVELOPMENT' &&
96-
disableSave !== true && <SaveStory {...{ resetArgs, saveStory, createStory }} />}
96+
disableSaveFromUI !== true && <SaveStory {...{ resetArgs, saveStory, createStory }} />}
9797
</AddonWrapper>
9898
);
9999
};

docs/essentials/controls.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ You can also update a control's value, then save the changes to the story. The s
262262

263263
### Disable creating and editing of stories
264264

265-
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.
265+
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.
266266

267267
## Configuration
268268

@@ -489,7 +489,7 @@ Specifies how the controls are sorted.
489489
* **alpha**: Sorted alphabetically, by the arg type's name
490490
* **requiredFirst**: Same as `alpha`, with any required arg types displayed first
491491

492-
#### `disableSave`
492+
#### `disableSaveFromUI`
493493

494494
Type: `boolean`
495495

0 commit comments

Comments
 (0)