Skip to content

Commit 6fb63cd

Browse files
committed
Add globals annotation to component/story
1 parent 40a5c7a commit 6fb63cd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/story.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,11 @@ export interface ComponentAnnotations<TRenderer extends Renderer = Renderer, TAr
494494
* Function that is executed after the story is rendered.
495495
*/
496496
play?: PlayFunction<TRenderer, TArgs>;
497+
498+
/**
499+
* Override the globals values for all stories in this component
500+
*/
501+
globals?: Globals;
497502
}
498503

499504
export type StoryAnnotations<
@@ -516,6 +521,11 @@ export type StoryAnnotations<
516521
*/
517522
play?: PlayFunction<TRenderer, TArgs>;
518523

524+
/**
525+
* Override the globals values for this story
526+
*/
527+
globals?: Globals;
528+
519529
/** @deprecated */
520530
story?: Omit<StoryAnnotations<TRenderer, TArgs>, 'story'>;
521531
// eslint-disable-next-line @typescript-eslint/ban-types

0 commit comments

Comments
 (0)