feat: add custom snippets
This commit is contained in:
parent
b9866fe801
commit
1f4e5f2f0c
3 changed files with 44 additions and 5 deletions
14
snippets/package.json
Normal file
14
snippets/package.json
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"name": "wonderfulfrog-snippets",
|
||||
"contributes": {
|
||||
"snippets": [
|
||||
{
|
||||
"language": [
|
||||
"typescriptreact",
|
||||
"typescript"
|
||||
],
|
||||
"path": "./typescript.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
25
snippets/typescript.json
Normal file
25
snippets/typescript.json
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"Storybook Component Template": {
|
||||
"prefix": "tssbc",
|
||||
"body": [
|
||||
"import type { Meta, StoryObj } from \"@storybook/react\";",
|
||||
"",
|
||||
"import { $1 } from \"./$1\";",
|
||||
"",
|
||||
"const meta = {",
|
||||
" title: \"$1\",",
|
||||
" component: $1,",
|
||||
" args: {",
|
||||
" $2",
|
||||
" },",
|
||||
" tags: [\"autodocs\"],",
|
||||
"} satisfies Meta<typeof $1>;",
|
||||
"",
|
||||
"export default meta",
|
||||
"type Story = StoryObj<typeof meta>;",
|
||||
"",
|
||||
"export const Default: Story = {}"
|
||||
],
|
||||
"description": "Create a Storybook template for a component"
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue