diff --git a/src/story.ts b/src/story.ts index 1219d85..86b60cd 100644 --- a/src/story.ts +++ b/src/story.ts @@ -144,7 +144,7 @@ export type BaseAnnotations[]; + decorators?: DecoratorFunction[]; /** * Custom metadata for a story. @@ -168,28 +168,23 @@ export type BaseAnnotations[]; + loaders?: LoaderFunction[]; /** * Define a custom render function for the story(ies). If not passed, a default render function by the framework will be used. */ - render?: ArgsStoryFn; - - /** - * Function that is executed after the story is rendered. - */ - play?: PlayFunction; + render?: ArgsStoryFn; }; export type ProjectAnnotations< TFramework extends AnyFramework = AnyFramework, TArgs = Args > = BaseAnnotations & { - argsEnhancers?: ArgsEnhancer[]; - argTypesEnhancers?: ArgTypesEnhancer[]; + argsEnhancers?: ArgsEnhancer[]; + argTypesEnhancers?: ArgTypesEnhancer[]; globals?: Globals; globalTypes?: GlobalTypes; - applyDecorators?: DecoratorApplicator; + applyDecorators?: DecoratorApplicator; }; type StoryDescriptor = string[] | RegExp; @@ -265,7 +260,7 @@ export type ComponentAnnotations< * * By defining them each component will have its tab in the args table. */ - subcomponents?: Record; + subcomponents?: Record; }; export type StoryAnnotations< @@ -281,6 +276,11 @@ export type StoryAnnotations< * Override the display name in the UI (CSF v2) */ storyName?: StoryName; + + /** + * Function that is executed after the story is rendered. + */ + play?: PlayFunction; /** @deprecated */ story?: Omit, 'story'>;