mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-11-30 02:32:58 +05:30
21 lines
638 B
TypeScript
21 lines
638 B
TypeScript
import React from 'react';
|
|
import addons, { DecoratorFunction } from '@storybook/addons';
|
|
import { ContextProvider } from 'app/shell';
|
|
import { browserHistory } from 'app/services/history';
|
|
import storeFactory from 'app/storeFactory';
|
|
import 'app/index.scss';
|
|
|
|
import { IntlDecorator } from './decorators';
|
|
|
|
const store = storeFactory();
|
|
|
|
export default ((story) => {
|
|
const channel = addons.getChannel();
|
|
|
|
return (
|
|
<ContextProvider store={store} history={browserHistory}>
|
|
<IntlDecorator channel={channel}>{story()}</IntlDecorator>
|
|
</ContextProvider>
|
|
);
|
|
}) as DecoratorFunction<React.ReactElement>;
|