Created
December 7, 2020 09:05
-
-
Save ChrisLowe-Takor/e5c7e755da32332d4168f1a658da4b12 to your computer and use it in GitHub Desktop.
React Storybook snippet
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
Show hidden characters
"Storybook": { | |
"prefix": "rstory", | |
"body": [ | |
"import React from 'react';", | |
"import { Story, Meta } from '@storybook/react/types-6-0';", | |
"import { Provider } from 'react-redux';", | |
"import store from '../../../../store/store';", | |
"", | |
"export default {", | |
" title: '$1'", | |
"} as Meta;", | |
"", | |
"const $1Story: Story = () => {", | |
" return (", | |
" <Provider store={store}>", | |
" <MyComponent />", | |
" </Provider>", | |
" )", | |
"}", | |
"", | |
"$1Story.storyName = \"My Story\";", | |
"", | |
"export const $1 = $1Story.bind({});" | |
], | |
"description": "Storybook" | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment