cna-template-uandersonmbc-tailwindcss
Version:
A template for Create Next App with Tailwind, Husky, Lint Staged, Prettier, Eslint, Jest, React Testing Library and Storybook
32 lines (26 loc) • 637 B
text/typescript
import type { Preview } from '@storybook/react';
import { withThemeByClassName } from '@storybook/addon-styling';
import { withThemeByDataAttribute } from '@storybook/addon-styling';
import './../src/app/globals.css';
const preview: Preview = {
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/
}
}
}
};
export const decorators = [
withThemeByDataAttribute({
themes: {
light: 'light',
dark: 'dark'
},
defaultTheme: 'light',
attributeName: 'data-mode'
})
];
export default preview;