mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-18 17:12:53 +03:00
a972705ce6
* Improve test coverage and refactor storybook arch * Fix coverage * Fix tests * Fix lint * Fix lint
40 lines
934 B
TypeScript
40 lines
934 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$/,
|
|
},
|
|
},
|
|
options: {
|
|
storySort: {
|
|
order: ['UI', 'Modules', 'Pages'],
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
export default preview;
|