@stories-js/angular
Version:
Angular Stories renderer and wrapper for custom elements of Stories to be used as first-class Angular components
42 lines (41 loc) • 1.45 kB
TypeScript
import type { Args, Meta as BesaMeta, Story as BaseStory, StoryFn, StoryComponent as BaseStoryComponent, StoryContext as BaseStoryContext } from "@stories-js/core";
export { StoryComponents } from "@stories-js/core";
export declare type NgModuleMetadata = {
declarations?: unknown[];
entryComponents?: unknown[];
imports?: unknown[];
schemas?: unknown[];
providers?: unknown[];
};
export declare type ICollection = Record<string, unknown>;
export declare type StoryFnAngularReturnType = {
props?: ICollection;
moduleMetadata?: NgModuleMetadata;
template?: string;
styles?: string[];
userDefinedTemplate?: boolean;
};
export declare type AngularFramework = {
component: unknown;
storyResult: StoryFnAngularReturnType;
};
/**
* Angular story function
*/
export declare type AngularStoryFn<TArgs = Args> = StoryFn<AngularFramework, TArgs>;
/**
* Metadata to configure the stories for a component.
*/
export declare type Meta<TArgs = Args> = BesaMeta<AngularFramework, TArgs>;
/**
* Story function that represents a CSFv3 component example.
*/
export declare type Story<TArgs = Args> = BaseStory<AngularFramework, TArgs>;
/**
* Story component for Angular Rendener
*/
export declare type StoryComponent<TArgs = Args> = BaseStoryComponent<AngularFramework, TArgs>;
/**
* Story context for Angular Rendener
*/
export declare type StoryContext<TArgs = Args> = BaseStoryContext<AngularFramework, TArgs>;