import type { Preview } from '@storybook/vue3' import { withThemeByDataAttribute } from '@storybook/addon-themes' const preview: Preview = { parameters: { actions: { argTypesRegex: '^on[A-Z].*' }, controls: { matchers: { color: /(background|color)$/i, date: /Date$/i } }, viewport: { viewports: { mobile: { name: 'Mobile', styles: { width: '375px', height: '667px' } }, tablet: { name: 'Tablet', styles: { width: '768px', height: '1024px' } }, desktop: { name: 'Desktop', styles: { width: '1440px', height: '900px' } } } }, a11y: { config: { rules: [ { id: 'color-contrast', enabled: true } ] } } }, decorators: [ withThemeByDataAttribute({ themes: { light: 'light', dark: 'dark' }, defaultTheme: 'light', attributeName: 'data-theme' }) ] } export default preview