enhance: Storybookのストーリーを作成

This commit is contained in:
Chocolate Pie 2023-06-21 09:39:58 +09:00
parent 66e9240e1b
commit 3b19cc7eb1

View file

@ -0,0 +1,39 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import MkAbuseReportResolver from './MkAbuseReportResolver.vue';
import type { StoryObj } from '@storybook/vue3';
export const Default = {
render(args) {
return {
components: {
MkAbuseReportResolver,
},
setup() {
return {
args,
};
},
computed: {
props() {
return {
...this.args,
};
},
},
template: '<MkAbuseReportResolver v-bind="props" />',
};
},
args: {
editable: true,
data: {
name: 'Sample',
targetUserPattern: '^.*@.+$',
reporterPattern: null,
reportContentPattern: null,
expiresAt: 'indefinitely',
forward: false,
},
},
parameters: {
layout: 'centered',
},
} satisfies StoryObj<typeof MkAbuseReportResolver>;