UNPKG

928 BTypeScriptView Raw
1import type { JSXElementConstructor } from 'react';
2import type { Args } from '@storybook/csf';
3import type { StoryObj } from './types-6-0';
4import type { ComponentStoryObj } from './types-6-3';
5export type { StoryFn, StoryObj, Meta } from './types-6-0';
6export type { ComponentStoryFn, ComponentStoryObj, ComponentMeta } from './types-6-3';
7/**
8 * Story function that represents a CSFv3 component example.
9 *
10 * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
11 */
12export declare type Story<TArgs = Args> = StoryObj<TArgs>;
13/**
14 * For the common case where a (CSFv3) story is a simple component that receives args as props:
15 *
16 * ```tsx
17 * const MyStory: ComponentStory<typeof Button> = {
18 * args: { buttonArg1: 'val' },
19 * }
20 * ```
21 */ export declare type ComponentStory<T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>> = ComponentStoryObj<T>;