1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-12-15 07:09:01 +09:00
misskey/packages/frontend/.vscode/storybook.code-snippets
Acid Chicken (硫酸鶏) 9bb6c536c0
test(#10336): add components/Mk[A-B].* stories (#10475)
* chore(#10336): register snippets

* test(#10336): add `components/Mk[A-B].*` stories

* build: desynced lockfile

* ci(#10336): preload assets

* ci(#10336): use pull_request

* build: update lockfile

* fix: reactivity transform

* chore: track upstream changes

* refactor: avoid temporary previous tapping declarations

* revert: avoid temporary previous tapping declarations

This reverts commit e649b1b1e6.

* test: flaky snapshots

* style: import
2023-04-13 12:20:39 +09:00

85 lines
1.9 KiB
Plaintext

{
"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/addon-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>;",
""
]
}
}