UNPKG

1.12 kBTypeScriptView Raw
1// Type definitions for @storybook/addon-info 3.4
2// Project: https://github.com/storybooks/storybook
3// Definitions by: Mark Kornblum <https://github.com/mkornblum>
4// Mattias Wikstrom <https://github.com/fyrkant>
5// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
6// TypeScript Version: 2.8
7
8import * as React from 'react';
9import { RenderFunction } from '@storybook/react';
10
11export interface WrapStoryProps {
12 storyFn?: RenderFunction;
13 context?: object;
14 options?: object;
15}
16
17export interface Options {
18 text?: string;
19 header?: boolean;
20 inline?: boolean;
21 source?: boolean;
22 propTables?: React.ComponentType[] | false;
23 propTablesExclude?: React.ComponentType[];
24 styles?: object;
25 marksyConf?: object;
26 maxPropsIntoLine?: number;
27 maxPropObjectKeys?: number;
28 maxPropArrayLength?: number;
29 maxPropStringLength?: number;
30}
31
32export function withInfo(textOrOptions?: string | Options): (storyFn: RenderFunction) => (context?: object) => React.ReactElement<WrapStoryProps>;
33
34export function setDefaults(newDefaults: Options): Options;