import { withThemeByClassName } from '@storybook/addon-themes'; import type { Preview } from '@storybook/react'; import '../src/global.css'; const preview: Preview = { parameters: { controls: { matchers: { color: /(background|color)$/i, date: /Date$/i, }, }, backgrounds: { default: 'light', values: [ { name: 'light', value: '#ffffff', }, { name: 'dark', value: '#0a0a0a', }, ], }, }, decorators: [ withThemeByClassName({ themes: { light: '', dark: 'dark', }, defaultTheme: 'light', }), ], }; export default preview;