Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.1.11 #102

Merged
merged 2 commits into from
Jul 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/story.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ export interface Renderer {
/** What type of element does this renderer render to? */
canvasElement: unknown;

mount(): Promise<Canvas>;

// 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
Expand Down Expand Up @@ -275,6 +277,7 @@ export interface StoryContext<TRenderer extends Renderer = Renderer, TArgs = Arg
step: StepFunction<TRenderer, TArgs>;
context: this;
canvas: Canvas;
mount: TRenderer['mount'];
}

/** @deprecated Use {@link StoryContext} instead. */
Expand Down Expand Up @@ -387,6 +390,8 @@ export interface BaseAnnotations<TRenderer extends Renderer = Renderer, TArgs =
* Named tags for a story, used to filter stories in different contexts.
*/
tags?: Tag[];

mount?: (context: StoryContext<TRenderer, TArgs>) => TRenderer['mount'];
}

export interface ProjectAnnotations<TRenderer extends Renderer = Renderer, TArgs = Args>
Expand Down
Loading