diff --git a/packages/frontend/.vscode/storybook.code-snippets b/packages/frontend/.vscode/storybook.code-snippets new file mode 100644 index 0000000000..785d0a1608 --- /dev/null +++ b/packages/frontend/.vscode/storybook.code-snippets @@ -0,0 +1,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;", + "" + ] + }, + "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;", + "" + ] + } +}