UNPKG

@storybook/react

Version:

Storybook for React: Develop React Component in isolation with Hot Reloading.

36 lines (35 loc) 1.56 kB
import type { ComponentType } from 'react'; import type { Args, ComponentAnnotations, StoryAnnotations, AnnotatedStoryFn } from '@storybook/csf'; import type { StoryFnReactReturnType } from './types'; export type { Args, ArgTypes, Parameters, StoryContext } from '@storybook/csf'; export declare type ReactFramework = { component: ComponentType<any>; storyResult: StoryFnReactReturnType; }; /** * Metadata to configure the stories for a component. * * @see [Default export](https://storybook.js.org/docs/formats/component-story-format/#default-export) */ export declare type Meta<TArgs = Args> = ComponentAnnotations<ReactFramework, TArgs>; /** * Story function that represents a CSFv2 component example. * * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports) */ export declare type StoryFn<TArgs = Args> = AnnotatedStoryFn<ReactFramework, TArgs>; /** * Story function that represents a CSFv3 component example. * * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports) */ export declare type StoryObj<TArgs = Args> = StoryAnnotations<ReactFramework, TArgs>; /** * Story function that represents a CSFv2 component example. * * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports) * * NOTE that in Storybook 7.0, this type will be renamed to `StoryFn` and replaced by the current `StoryObj` type. * */ export declare type Story<TArgs = Args> = StoryFn<TArgs>;