Skip to content

Commit

Permalink
Add globals annotation to component/story
Browse files Browse the repository at this point in the history
  • Loading branch information
shilman committed Jun 3, 2024
1 parent 40a5c7a commit 6fb63cd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/story.ts
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,11 @@ export interface ComponentAnnotations<TRenderer extends Renderer = Renderer, TAr
* Function that is executed after the story is rendered.
*/
play?: PlayFunction<TRenderer, TArgs>;

/**
* Override the globals values for all stories in this component
*/
globals?: Globals;
}

export type StoryAnnotations<
Expand All @@ -516,6 +521,11 @@ export type StoryAnnotations<
*/
play?: PlayFunction<TRenderer, TArgs>;

/**
* Override the globals values for this story
*/
globals?: Globals;

/** @deprecated */
story?: Omit<StoryAnnotations<TRenderer, TArgs>, 'story'>;
// eslint-disable-next-line @typescript-eslint/ban-types
Expand Down

0 comments on commit 6fb63cd

Please sign in to comment.