Skip to content

Instantly share code, notes, and snippets.

@ChrisLowe-Takor
Created December 8, 2020 08:33
Show Gist options
  • Save ChrisLowe-Takor/0d5c3ba83b3dbe12297d9a9d7a290a8b to your computer and use it in GitHub Desktop.
Save ChrisLowe-Takor/0d5c3ba83b3dbe12297d9a9d7a290a8b to your computer and use it in GitHub Desktop.
Using redux state in storybook
import React from 'react';
import { Story, Meta } from '@storybook/react/types-6-0';
import { Provider } from 'react-redux';
import store from '../../../../store/store';
import SentinelDrawer from './sentinel-drawer';
export default {
title: 'Sentinel Drawer'
} as Meta;
const SentinelDrawerStory: Story = () => {
return (
<Provider store={store}>
<SentinelDrawer />
</Provider>
)
};
export const SentinelDrawerStory.bind({});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment