Skip to content

Instantly share code, notes, and snippets.

@jonwaldstein
Created October 4, 2019 15:43
Show Gist options
  • Save jonwaldstein/d35f3b456cf1889c2db68989735ace1b to your computer and use it in GitHub Desktop.
Save jonwaldstein/d35f3b456cf1889c2db68989735ace1b to your computer and use it in GitHub Desktop.
VCODE SNIPPET - storybook mdx
{
"Scaffolds a Storybook Story in MDX": {
"prefix": "storymdx",
"body": [
"import {Meta, Story, Preview} from '@storybook/addon-docs/blocks';",
"import {action} from '@storybook/addon-actions';",
"",
"import ${TM_FILENAME_BASE/(.*)\\..+$/$1/} from './index';",
"",
"<Meta title=\"Components|${TM_FILENAME_BASE/(.*)\\..+$/$1/}\" component={${TM_FILENAME_BASE/(.*)\\..+$/$1/}} />",
"",
"# ${TM_FILENAME_BASE/(.*)\\..+$/$1/}",
"",
"<Preview>",
" <Story name=\"default\">",
" <div>Hello World</div>",
" </Story>",
"</Preview>",
""
],
"description": "Scaffolds a Storybook Story in MDX"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment