UNPKG

1.5 kBTypeScriptView Raw
1import type { Args, ComponentAnnotations, StoryAnnotations, AnnotatedStoryFn } from '@storybook/csf';
2import type { StoryFnHtmlReturnType } from './types';
3export type { Args, ArgTypes, Parameters, StoryContext } from '@storybook/addons';
4export declare type HtmlFramework = {
5 component: HTMLElement;
6 storyResult: StoryFnHtmlReturnType;
7};
8/**
9 * Metadata to configure the stories for a component.
10 *
11 * @see [Default export](https://storybook.js.org/docs/formats/component-story-format/#default-export)
12 */
13export declare type Meta<TArgs = Args> = ComponentAnnotations<HtmlFramework, TArgs>;
14/**
15 * Story function that represents a CSFv2 component example.
16 *
17 * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
18 */
19export declare type StoryFn<TArgs = Args> = AnnotatedStoryFn<HtmlFramework, TArgs>;
20/**
21 * Story function that represents a CSFv3 component example.
22 *
23 * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
24 */
25export declare type StoryObj<TArgs = Args> = StoryAnnotations<HtmlFramework, TArgs>;
26/**
27 * Story function that represents a CSFv2 component example.
28 *
29 * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
30 *
31 * NOTE that in Storybook 7.0, this type will be renamed to `StoryFn` and replaced by the current `StoryObj` type.
32 *
33 */
34export declare type Story<TArgs = Args> = StoryFn<TArgs>;