Merge pull request #26644 from amacleay/storybook-addon-options-newnames

Add newer option names to storybook__addon-options
This commit is contained in:
Nathan Shively-Sanders
2018-06-19 10:29:43 -07:00
committed by GitHub
2 changed files with 22 additions and 3 deletions

View File

@@ -2,6 +2,7 @@
// Project: https://github.com/storybooks/storybook
// Definitions by: Joscha Feth <https://github.com/joscha>
// Simon Helle Nielsen <https://github.com/simonhn>
// A.MacLeay <https://github.com/amacleay>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
@@ -9,13 +10,17 @@ export interface Options {
name?: string;
url?: string;
goFullScreen?: boolean;
showLeftPanel?: boolean;
showDownPanel?: boolean;
showLeftPanel?: boolean; // deprecated, use showStoriesPanel
showStoriesPanel?: boolean;
showDownPanel?: boolean; // deprecated; use showAddonPanel
showAddonPanel?: boolean;
showSearchBox?: boolean;
downPanelInRight?: boolean;
downPanelInRight?: boolean; // deprecated; use addonPanelInRight
addonPanelInRight?: boolean;
sortStoriesByKind?: boolean;
hierarchySeparator?: RegExp | string;
hierarchyRootSeparator?: RegExp | string;
selectedAddonPanel?: string;
}
export function setOptions(options: Options): void;

View File

@@ -4,6 +4,20 @@ setOptions({
name: 'My Storybook',
url: 'https://example.com',
goFullScreen: false,
showStoriesPanel: false,
showAddonPanel: false,
showSearchBox: false,
addonPanelInRight: false,
sortStoriesByKind: false,
hierarchySeparator: /\//,
hierarchyRootSeparator: /\|/,
selectedAddonPanel: 'storybook/actions/action-panel',
});
setOptions({
name: 'My Storybook - deprecated options',
url: 'https://example.com',
goFullScreen: false,
showLeftPanel: false,
showDownPanel: false,
showSearchBox: false,