mirror of
https://github.com/hazemKrimi/crimson-quirks-ui.git
synced 2026-05-02 02:30:29 +00:00
30 lines
634 B
TypeScript
30 lines
634 B
TypeScript
import type { Preview } from '@storybook/react'
|
|
|
|
import { ThemeProvider } from 'styled-components';
|
|
import { withThemeFromJSXProvider } from '@storybook/addon-themes';
|
|
|
|
import { defaultTheme } from '../src/themes';
|
|
|
|
import GlobalStyles from '../src/components/GlobalStyles';
|
|
|
|
const preview: Preview = {
|
|
parameters: {
|
|
controls: {
|
|
matchers: {
|
|
color: /(background|color)$/i,
|
|
date: /Date$/i,
|
|
},
|
|
},
|
|
},
|
|
decorators: [withThemeFromJSXProvider({
|
|
themes: {
|
|
theme: defaultTheme,
|
|
},
|
|
defaultTheme: 'theme',
|
|
Provider: ThemeProvider,
|
|
GlobalStyles,
|
|
})],
|
|
};
|
|
|
|
export default preview;
|