UNPKG

@shopware-ag/meteor-component-library

Version:

The meteor component library is a Vue component library developed by Shopware. It is based on the [Meteor Design System](https://shopware.design/).

16 lines (15 loc) 1.01 kB
import { Meta, ComponentPropsAndSlots, StoryObj, VueRenderer } from '@storybook/vue3'; import { DefineComponent, FunctionalComponent } from 'vue'; import { BoundFunctions, queries } from '@testing-library/vue'; import { PlayFunctionContext } from '@storybook/types'; import { Constructor } from 'type-fest'; export type SlottedMeta<TComponent extends abstract new (...args: any) => any, TSlots extends string> = Meta<DefineComponent<InstanceType<TComponent>["$props"] & Record<TSlots, any>>>; type ComponentPropsOrProps<TCmpOrArgs> = TCmpOrArgs extends Constructor<any> ? ComponentPropsAndSlots<TCmpOrArgs> : TCmpOrArgs extends FunctionalComponent<any> ? ComponentPropsAndSlots<TCmpOrArgs> : TCmpOrArgs; export declare function defineStory<T>(config: Omit<StoryObj<T>, "play"> & { play?: (context: PlayFunctionContext<VueRenderer, ComponentPropsOrProps<T>> & { screen: BoundFunctions<typeof queries>; }) => Promise<void>; }, extension?: { from: StoryObj<T>; }): StoryObj<T>; export {};