Created
March 24, 2020 14:06
-
-
Save Lucasdsk/196f4733f2ff418906805002364d7c0d to your computer and use it in GitHub Desktop.
Snippet to create Storybook stories
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Create a story": { | |
"scope": "javascript, typescript", | |
"prefix": "story", | |
"body": [ | |
"import React from 'react'", | |
"import ${TM_FILENAME_BASE/(.*)\\..+$/$1/} from '.'", | |
"", | |
"export default {", | |
"\ttitle: '${2:My Story}',", | |
"\tcomponent: ${TM_FILENAME_BASE/(.*)\\..+$/$1/}", | |
"}", | |
"", | |
"export const ${TM_FILENAME_BASE/(.*)\\..+$/Story$1/} = () => <${TM_FILENAME_BASE/(.*)\\..+$/$1/} />", | |
"" | |
], | |
"description": "Creates a new Story based on the storybook" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment