test: add stories for `MkChannelPreview`
This commit is contained in:
parent
01b7ce11ba
commit
48e2943502
|
@ -0,0 +1,2 @@
|
|||
import MkChannelList from './MkChannelList.vue';
|
||||
void MkChannelList;
|
|
@ -0,0 +1,32 @@
|
|||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
||||
import { StoryObj } from '@storybook/vue3';
|
||||
import { channel } from '../../.storybook/fakes';
|
||||
import MkChannelPreview from './MkChannelPreview.vue';
|
||||
export const Default = {
|
||||
render(args) {
|
||||
return {
|
||||
components: {
|
||||
MkChannelPreview,
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
args,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
props() {
|
||||
return {
|
||||
...this.args,
|
||||
};
|
||||
},
|
||||
},
|
||||
template: '<MkChannelPreview v-bind="props" / >',
|
||||
};
|
||||
},
|
||||
args: {
|
||||
channel: channel(),
|
||||
},
|
||||
parameters: {
|
||||
layout: 'default',
|
||||
},
|
||||
} satisfies StoryObj<typeof MkChannelPreview>;
|
Loading…
Reference in New Issue