build(#10336): write some stories

This commit is contained in:
Acid Chicken (硫酸鶏)
2023-04-01 04:20:38 +09:00
parent 85f50f3875
commit 671ce6a531
9 changed files with 160 additions and 14 deletions

View File

@@ -1,11 +1,15 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */
/* eslint-disable import/no-default-export */
import { Meta, StoryObj } from '@storybook/vue3';
import MkCustomEmoji from './MkCustomEmoji.vue';
import { Meta } from '@storybook/vue3';
const meta = {
title: 'components/global/MkCustomEmoji',
component: MkCustomEmoji,
} satisfies Meta<typeof MkCustomEmoji>;
export default meta;
/* eslint-disable @typescript-eslint/explicit-function-return-type */
/* eslint-disable import/no-duplicates */
import { StoryObj } from '@storybook/vue3';
import MkCustomEmoji from './MkCustomEmoji.vue';
export const Default = {
render(args) {
return {
@@ -27,8 +31,24 @@ export const Default = {
template: '<MkCustomEmoji v-bind="props" />',
};
},
args: {
name: 'mi',
url: 'https://github.com/misskey-dev/misskey/blob/master/packages/frontend/assets/about-icon.png?raw=true',
},
parameters: {
layout: 'centered',
},
} satisfies StoryObj<typeof MkCustomEmoji>;
export default meta;
export const Normal = {
...Default,
args: {
...Default.args,
normal: true,
},
};
export const Missing = {
...Default,
args: {
name: Default.args.name,
},
};