summaryrefslogtreecommitdiff
path: root/packages/frontend/.vscode/storybook.code-snippets
blob: d7063f7200ffe9248341d0366fe01e60ff2a9a88 (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
{
	"Storybook Story Impl File": {
		"scope": "typescript",
		"prefix": "storyimpl",
		"body": [
			"/* eslint-disable @typescript-eslint/explicit-function-return-type */",
			"import { StoryObj } from '@storybook/vue3';",
			"import $1 from './$1.vue';",
			"export const Default = {",
			"\trender(args) {",
			"\t\treturn {",
			"\t\t\tcomponents: {",
			"\t\t\t\t$1,",
			"\t\t\t},",
			"\t\t\tsetup() {",
			"\t\t\t\treturn {",
			"\t\t\t\t\targs,",
			"\t\t\t\t};",
			"\t\t\t},",
			"\t\t\tcomputed: {",
			"\t\t\t\tprops() {",
			"\t\t\t\t\treturn {",
			"\t\t\t\t\t\t...this.args,",
			"\t\t\t\t\t};",
			"\t\t\t\t},",
			"\t\t\t},",
			"\t\t\ttemplate: '<$1 v-bind=\"props\" />',",
			"\t\t};",
			"\t},",
			"\targs: {",
			"\t\t$2",
			"\t},",
			"\tparameters: {",
			"\t\tlayout: 'centered',",
			"\t},",
			"} satisfies StoryObj<typeof $1>;",
			""
		]
	},
	"Storybook Story Impl File (w/ events)": {
		"scope": "typescript",
		"prefix": "storyimplevent",
		"body": [
			"/* eslint-disable @typescript-eslint/explicit-function-return-type */",
			"import { action } from 'storybook/actions';",
			"import { StoryObj } from '@storybook/vue3';",
			"import $1 from './$1.vue';",
			"export const Default = {",
			"\trender(args) {",
			"\t\treturn {",
			"\t\t\tcomponents: {",
			"\t\t\t\t$1,",
			"\t\t\t},",
			"\t\t\tsetup() {",
			"\t\t\t\treturn {",
			"\t\t\t\t\targs,",
			"\t\t\t\t};",
			"\t\t\t},",
			"\t\t\tcomputed: {",
			"\t\t\t\tprops() {",
			"\t\t\t\t\treturn {",
			"\t\t\t\t\t\t...this.args,",
			"\t\t\t\t\t};",
			"\t\t\t\t},",
			"\t\t\t\tevents() {",
			"\t\t\t\t\treturn {",
			"\t\t\t\t\t\t$3",
			"\t\t\t\t\t};",
			"\t\t\t\t},",
			"\t\t\t},",
			"\t\t\ttemplate: '<$1 v-bind=\"props\" v-on=\"events\" />',",
			"\t\t};",
			"\t},",
			"\targs: {",
			"\t\t$2",
			"\t},",
			"\tparameters: {",
			"\t\tlayout: 'centered',",
			"\t},",
			"} satisfies StoryObj<typeof $1>;",
			""
		]
	}
}