mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-16 07:37:15 +03:00
5ae5f28dcb
* Add a new story for dark mode * Reorganize storybook menu * Fix command menu margins * Fix tests
32 lines
782 B
TypeScript
32 lines
782 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/layout/styles/themes';
|
|
|
|
initialize();
|
|
|
|
const preview: Preview = {
|
|
decorators: [
|
|
mswDecorator,
|
|
withThemeFromJSXProvider({
|
|
themes: {
|
|
light: lightTheme,
|
|
dark: darkTheme,
|
|
},
|
|
defaultTheme: "light",
|
|
Provider: ThemeProvider,
|
|
})
|
|
],
|
|
parameters: {
|
|
actions: { argTypesRegex: '^on[A-Z].*' },
|
|
controls: {
|
|
matchers: {
|
|
color: /(background|color)$/i,
|
|
date: /Date$/,
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
export default preview; |