We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
//.storybook/main.ts const config: StorybookConfig = { stories: [ '../storybook/**/*.mdx', '../storybook/**/*.story.@(js|jsx|mjs|ts|tsx)' ], addons: [ '@storybook/addon-links', '@storybook/addon-essentials', '@storybook/blocks', '@storybook/addon-interactions', { name: '@storybook/addon-styling', options: {} }, '@storybook/addon-a11y', '@storybook/addon-designs', '@storybook/addon-mdx-gfm', 'storybook-addon-performance' ], framework: { name: '@storybook/react-webpack5', options: {} }, docs: { autodocs: 'tag' } };
.storybook/preview.ts import type { Preview } from '@storybook/react'; import { createGlobalStyle, ThemeProvider } from 'styled-components'; import { withThemeFromJSXProvider } from '@storybook/addon-styling'; import { withPerformance } from 'storybook-addon-performance'; import lightTheme from '../src/constants/defaultThemes/lightThemes'; /* TODO: update import for your custom theme configurations */ // import { lightTheme, darkTheme } from '../path/to/themes'; /* TODO: replace with your own global styles, or remove */ const GlobalStyles = createGlobalStyle` body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } `; const preview: Preview = { parameters: { actions: { argTypesRegex: '^on[A-Z].*' }, controls: { matchers: { color: /(background|color)$/i, date: /Date$/ } } }, decorators: [ // Adds global styles and theme switching support. withThemeFromJSXProvider({ /* Uncomment for theme switching support */ themes: { light: lightTheme }, defaultTheme: 'light', Provider: ThemeProvider, GlobalStyles }), withPerformance ] };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: