Files
penpot/frontend/.storybook/preview.js
2025-12-03 16:44:37 +01:00

48 lines
934 B
JavaScript

import { withThemeByClassName } from "@storybook/addon-themes";
import Components from "@target/components";
import translations from "@public/translation.en.js";
Components.setDefaultTranslations(translations);
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;