mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-15 21:36:21 +03:00
ca1723f2e6
* refactor: add RootDecorator * docs: add EditableCellText stories --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
35 lines
841 B
TypeScript
35 lines
841 B
TypeScript
import { initialize, mswDecorator } from 'msw-storybook-addon';
|
|
import { Preview } from '@storybook/react';
|
|
import { ThemeProvider } from '@emotion/react';
|
|
import { withThemeFromJSXProvider } from '@storybook/addon-styling';
|
|
import { lightTheme, darkTheme } from '../src/modules/ui/themes/themes';
|
|
import { RootDecorator } from '../src/testing/decorators';
|
|
|
|
initialize();
|
|
|
|
const preview: Preview = {
|
|
decorators: [
|
|
mswDecorator,
|
|
withThemeFromJSXProvider({
|
|
themes: {
|
|
light: lightTheme,
|
|
dark: darkTheme,
|
|
},
|
|
defaultTheme: 'light',
|
|
Provider: ThemeProvider,
|
|
}),
|
|
RootDecorator,
|
|
],
|
|
parameters: {
|
|
actions: { argTypesRegex: '^on[A-Z].*' },
|
|
controls: {
|
|
matchers: {
|
|
color: /(background|color)$/i,
|
|
date: /Date$/,
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
export default preview;
|