Files
penpot/frontend/.storybook/preview.js
Belén Albeza 78fde35df9 🔧 Upgrade storybook (#7693)
* 🔧 Upgrade to storybook 9.x

* 🔧 Upgrade to storybook 10.x

* 🔧 Update watch:storybook script so it builds its assets dependencies first

* 🔧 Use vitest for storybook tests (test-storybook was deprecated)
2025-11-05 17:15:19 +01:00

43 lines
784 B
JavaScript

import { withThemeByClassName } from "@storybook/addon-themes";
import '../resources/public/css/ds.css';
export const decorators = [
withThemeByClassName({
themes: {
light: "light",
dark: "default",
},
defaultTheme: "dark",
parentSelector: "body",
}),
];
/** @type { import('@storybook/react-vite').Preview } */
const preview = {
decorators: decorators,
parameters: {
controls: {
disableSaveFromUI: true,
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
backgrounds: {
options: {
theme: { name: 'theme', value: 'var(--color-background-secondary)' }
}
},
},
initialGlobals: {
backgrounds: {
value: "theme"
}
}
};
export default preview;