mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-31 03:02:04 +08:00
Merge pull request #26644 from amacleay/storybook-addon-options-newnames
Add newer option names to storybook__addon-options
This commit is contained in:
11
types/storybook__addon-options/index.d.ts
vendored
11
types/storybook__addon-options/index.d.ts
vendored
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user