UNPKG

@stories-js/vue

Version:

Vue 3 Stories renderer and wrapper for custom elements of Stories to be used as first-class Vue 3 components

30 lines (29 loc) 1.42 kB
import type { Args, Meta as BesaMeta, Story as BaseStory, StoryFn as BaseStoryFn, StoryComponent as BaseStoryComponent, StoryContext as BaseStoryContext, DecoratorFunction as BaseDecoratorFunction, AnyFramework } from "@stories-js/core"; import { ConcreteComponent } from "vue"; export declare type StoryFnVueReturnType = ConcreteComponent<any>; export declare type VueFramework = { component: ConcreteComponent; storyResult: StoryFnVueReturnType; }; export declare type DecoratorFunction<TFramework extends AnyFramework = VueFramework, TArgs = Args> = BaseDecoratorFunction<TFramework, TArgs>; /** * React story function */ export declare type StoryFn<TArgs = Args> = BaseStoryFn<VueFramework, TArgs>; /** * Metadata to configure the stories for a component. */ export declare type Meta<TArgs = Args> = BesaMeta<VueFramework, TArgs>; /** * Story function that represents a CSFv3 component example. */ export declare type Story<TArgs = Args> = BaseStory<VueFramework, TArgs>; /** * Story component for React Rendener */ export declare type StoryComponent<TArgs = Args> = BaseStoryComponent<VueFramework, TArgs>; /** * Story context for React Rendener */ export declare type StoryContext<TArgs = Args> = BaseStoryContext<VueFramework, TArgs>; export declare type LegacyStoryFn<TFramework extends AnyFramework = AnyFramework, TArgs = Args> = (context: StoryContext<TArgs>) => TFramework['storyResult'];