graphql-engine/console/.storybook/preview.js
Nicolas Beaussart a34f8d86cb console: add storybook support
https://github.com/hasura/graphql-engine-mono/pull/2154

Co-authored-by: Matt Hardman <28978422+mattshardman@users.noreply.github.com>
GitOrigin-RevId: e3caefdd0eaa904ed2167248cc166cdb38e7722e
2021-09-20 16:31:25 +00:00

24 lines
574 B
JavaScript

import React from 'react';
import { Provider } from 'react-redux';
import { addDecorator } from '@storybook/react';
import { initializeWorker, mswDecorator } from 'msw-storybook-addon';
import '../src/theme/tailwind.css';
import { store } from '../src/store';
export const parameters = {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
};
export const decorators = [
(fn, c) => <Provider store={store}>{fn(c)}</Provider>,
];
initializeWorker();
addDecorator(mswDecorator);