Merge pull request #17408 from joscha/joscha/add-@storybook/addon-options

add package @storybook/addon-options
This commit is contained in:
Nathan Shively-Sanders
2017-06-22 16:28:27 -07:00
committed by GitHub
4 changed files with 60 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
// Type definitions for @storybook/addon-options 3.0
// Project: https://github.com/storybooks/storybook
// Definitions by: Joscha Feth <https://github.com/joscha>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
// TODO: Once TS2.3 is released,
// https://github.com/Microsoft/TypeScript/issues/14819 should be fixed.
// Then, upgrade this package's typescript version to 2.3 and
// Remove the `declare module` wrapper.
// tslint:disable-next-line no-single-declare-module
declare module '@storybook/addon-options' {
interface Options {
name?: string;
url?: string;
goFullScreen?: boolean;
showLeftPanel?: boolean;
showDownPanel?: boolean;
showSearchBox?: boolean;
downPanelInRight?: boolean;
sortStoriesByKind?: boolean;
}
function setOptions(options: Options): void;
}
@@ -0,0 +1,12 @@
import { setOptions } from '@storybook/addon-options';
setOptions({
name: 'My Storybook',
url: 'https://example.com',
goFullScreen: false,
showLeftPanel: false,
showDownPanel: false,
showSearchBox: false,
downPanelInRight: false,
sortStoriesByKind: false,
});
@@ -0,0 +1,22 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"storybook__addon-options-tests.ts"
]
}
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }