From c19278a4ff0a0a8310a34ff4767e24f4aacdc720 Mon Sep 17 00:00:00 2001 From: Aaron Reisman Date: Wed, 30 Nov 2022 13:48:53 -0800 Subject: [PATCH] Update story.ts Add story as prop, as it works as expected, but just isn't exposed. I wanted to test out some functionality real quick and wanted to wrap the component in another tag to make sure some events worked correctly, but noticed this type was not exposed. is there a reason for that? or just maybe overlooked? --- src/story.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/story.ts b/src/story.ts index f937a4a..a3e4c5d 100644 --- a/src/story.ts +++ b/src/story.ts @@ -343,6 +343,13 @@ export type StoryAnnotations< */ storyName?: StoryName; + /** + * The primary component for your story. + * + * Used by addons for automatic prop table generation and display of other component metadata. + */ + component?: (TRenderer & { T: Args extends TArgs ? any : TArgs })['component']; + /** * Function that is executed after the story is rendered. */