UNPKG

@muban/storybook

Version:
18 lines (17 loc) 987 B
import { type ComponentTemplateResult } from '@muban/template'; import type { Args, DecoratorFunction, StoryContext } from '@storybook/types'; import type { MubanRenderer, StoryFnMubanReturnType as StoryFunctionMubanReturnType } from '../types.js'; type StoryFunction = () => StoryFunctionMubanReturnType; export declare const DECORATOR_PLACEHOLDER_FOR_SERVER_INJECTION = "__PLACEHOLDER__"; /** * Helper function for component decorators that: * - allows you to pass only a component or template, where this function will fill in the other part * - already apply the template props and pass the rendered child template */ export declare function createDecoratorComponent<A extends Args>(createDecoratorFunction: (meta: { story: StoryFunction; context: StoryContext<MubanRenderer, A>; component: StoryFunctionMubanReturnType['component']; template: ComponentTemplateResult; }) => Partial<StoryFunctionMubanReturnType>): DecoratorFunction<MubanRenderer, A>; export {};