summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/global/MkResult.stories.impl.ts
blob: 05f8c9069b6c940370feebe3a0fc407935c9b104 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
 * SPDX-FileCopyrightText: syuilo and misskey-project
 * SPDX-License-Identifier: AGPL-3.0-only
 */

import MkResult from './MkResult.vue';
import type { StoryObj } from '@storybook/vue3';
export const Default = {
	render(args) {
		return {
			components: {
				MkResult,
			},
			setup() {
				return {
					args,
				};
			},
			computed: {
				props() {
					return {
						...this.args,
					};
				},
			},
			template: '<MkResult v-bind="props" />',
		};
	},
	args: {
		type: 'empty',
		text: 'Lorem Ipsum',
	},
	parameters: {
		layout: 'centered',
	},
} satisfies StoryObj<typeof MkResult>;
export const emptyWithNoText = {
	...Default,
	args: {
		...Default.args,
		text: undefined,
	},
} satisfies StoryObj<typeof MkResult>;
export const notFound = {
	...Default,
	args: {
		...Default.args,
		type: 'notFound',
	},
} satisfies StoryObj<typeof MkResult>;
export const errorType = {
	...Default,
	args: {
		...Default.args,
		type: 'error',
	},
} satisfies StoryObj<typeof MkResult>;