Skip to content

Commit

Permalink
[#390] storybook snippet 작성 (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
gxxrxn authored Aug 8, 2023
1 parent e5f8fcd commit 4fdc294
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .vscode/storybook.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"create a story for react component": {
"scope": "typescript,typescriptreact",
"prefix": "!story",
"body": [
"import { Meta, StoryObj } from '@storybook/react';",
"",
"const meta: Meta<typeof ${1:${TM_FILENAME_BASE/(.*)\\..+$/$1/}}> = {",
" title: 'Base/${1}',",
" component: ${1},",
" tags: ['autodocs'],",
"};",
"",
"export default meta;",
"",
"type Story = StoryObj<typeof ${1}>;",
"",
"export const Default: Story = {",
" args: {$2},",
"};",
""
]
}
}

0 comments on commit 4fdc294

Please sign in to comment.