mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 07:41:58 +08:00
fix: loosen props type in Vue 3 Meta & add to TS example
This commit is contained in:
parent
5200223bf2
commit
349bb6d652
@ -4,7 +4,7 @@ import { StoryFnVueReturnType } from './types';
|
|||||||
|
|
||||||
export type { Args, ArgTypes, Parameters, StoryContext } from '@storybook/addons';
|
export type { Args, ArgTypes, Parameters, StoryContext } from '@storybook/addons';
|
||||||
|
|
||||||
type VueComponent = ConcreteComponent;
|
type VueComponent = ConcreteComponent<any>;
|
||||||
type VueReturnType = StoryFnVueReturnType;
|
type VueReturnType = StoryFnVueReturnType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Story } from '@storybook/vue3';
|
import { Story, Meta } from '@storybook/vue3';
|
||||||
import { FunctionalComponent, h } from 'vue';
|
import { FunctionalComponent, h } from 'vue';
|
||||||
import DynamicHeading, { Props } from './DynamicHeading';
|
import DynamicHeading, { Props } from './DynamicHeading';
|
||||||
|
|
||||||
@ -9,7 +9,7 @@ export default {
|
|||||||
// Number type is detected, but we still want to constrain the range from 1-6
|
// Number type is detected, but we still want to constrain the range from 1-6
|
||||||
level: { control: { min: 1, max: 6 } },
|
level: { control: { min: 1, max: 6 } },
|
||||||
},
|
},
|
||||||
};
|
} as Meta;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
You can return a Vue 3 functional component from a Story.
|
You can return a Vue 3 functional component from a Story.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user