mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Add new attributes and bump type definition version to 4.0
This commit is contained in:
+5
-2
@@ -1,13 +1,14 @@
|
||||
// Type definitions for @storybook/addon-options 3.2
|
||||
// Type definitions for @storybook/addon-options 4.0
|
||||
// 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>
|
||||
// Gaetan Maisse <https://github.com/gaetanmaisse>
|
||||
// Adam Misiorny <https://github.com/adam187>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
import { StoryDecorator } from "@storybook/react";
|
||||
import { StoryDecorator } from '@storybook/react';
|
||||
|
||||
export interface Options {
|
||||
name?: string;
|
||||
@@ -23,7 +24,9 @@ export interface Options {
|
||||
sortStoriesByKind?: boolean;
|
||||
hierarchySeparator?: RegExp | string;
|
||||
hierarchyRootSeparator?: RegExp | string;
|
||||
sidebarAnimations?: boolean;
|
||||
selectedAddonPanel?: string;
|
||||
enableShortcuts?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
import { setOptions, withOptions } from '@storybook/addon-options';
|
||||
import { addDecorator } from '@storybook/react';
|
||||
import { setOptions, withOptions } from '@storybook/addon-options';
|
||||
|
||||
addDecorator(
|
||||
withOptions({
|
||||
name: 'My Storybook',
|
||||
url: 'https://example.com',
|
||||
goFullScreen: false,
|
||||
showStoriesPanel: false,
|
||||
showAddonPanel: false,
|
||||
showSearchBox: false,
|
||||
addonPanelInRight: false,
|
||||
sortStoriesByKind: false,
|
||||
hierarchySeparator: /\//,
|
||||
hierarchyRootSeparator: /\|/,
|
||||
sidebarAnimations: false,
|
||||
selectedAddonPanel: 'storybook/actions/action-panel',
|
||||
enableShortcuts: false
|
||||
})
|
||||
);
|
||||
|
||||
setOptions({
|
||||
name: 'My Storybook',
|
||||
@@ -12,7 +30,9 @@ setOptions({
|
||||
sortStoriesByKind: false,
|
||||
hierarchySeparator: /\//,
|
||||
hierarchyRootSeparator: /\|/,
|
||||
sidebarAnimations: false,
|
||||
selectedAddonPanel: 'storybook/actions/action-panel',
|
||||
enableShortcuts: false
|
||||
});
|
||||
|
||||
setOptions({
|
||||
@@ -32,19 +52,3 @@ setOptions({
|
||||
hierarchySeparator: '.',
|
||||
hierarchyRootSeparator: '#',
|
||||
});
|
||||
|
||||
addDecorator(
|
||||
withOptions({
|
||||
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"
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user