From 877a29786a5cde58b38a602d3a3208184f109661 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Fri, 28 Jun 2024 12:48:16 +0200 Subject: [PATCH] Add mount to csf --- src/story.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/story.ts b/src/story.ts index 424edf1..975f820 100644 --- a/src/story.ts +++ b/src/story.ts @@ -210,6 +210,8 @@ export interface Renderer { /** What type of element does this renderer render to? */ canvasElement: unknown; + mount(): Promise; + // A generic type T that can be used in the definition of the component like this: // component: (args: this['T']) => string; // This generic type will eventually be filled in with TArgs @@ -273,6 +275,7 @@ export interface StoryContext; context: this; canvas: Canvas; + mount: TRenderer['mount']; } /** @deprecated Use {@link StoryContext} instead. */ @@ -385,6 +388,8 @@ export interface BaseAnnotations) => TRenderer['mount']; } export interface ProjectAnnotations