chore: include react components in twenty-ui test config (#4709)
Split from https://github.com/twentyhq/twenty/pull/4518 Part of https://github.com/twentyhq/twenty/issues/4766 - Re-generates some of the twenty-ui test and storybook config with Nx - Includes tsx files in twenty-ui tests and compiles them with swc --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
21
packages/twenty-ui/.storybook/preview.ts
Normal file
21
packages/twenty-ui/.storybook/preview.ts
Normal file
@ -0,0 +1,21 @@
|
||||
import { ThemeProvider } from '@emotion/react';
|
||||
import { withThemeFromJSXProvider } from '@storybook/addon-themes';
|
||||
import { Preview, ReactRenderer } from '@storybook/react';
|
||||
|
||||
import { THEME_DARK, THEME_LIGHT } from '../src/theme/index';
|
||||
|
||||
const preview: Preview = {
|
||||
// TODO: Add toggle for darkTheme.
|
||||
decorators: [
|
||||
withThemeFromJSXProvider<ReactRenderer>({
|
||||
themes: {
|
||||
light: THEME_LIGHT,
|
||||
dark: THEME_DARK,
|
||||
},
|
||||
defaultTheme: 'light',
|
||||
Provider: ThemeProvider,
|
||||
}),
|
||||
],
|
||||
};
|
||||
|
||||
export default preview;
|
||||
Reference in New Issue
Block a user