Files
webstudio/packages/design-system/.storybook/preview.ts
T
Bogdan Chadkin e66e118ad5 Migrate to storybook 7 (#1862)
See https://storybook.js.org/docs/react/migration-guide and
https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#from-version-65x-to-700

- all configs are now ts/esm
- had to add hack (process.env.NODE_ENV) to workaround storybook bug
- webpack is gone
- renamed storybook:run to storybook:dev
- amount of packages reduced from 2456 to 2060
2023-06-27 10:02:58 +03:00

31 lines
886 B
TypeScript

import type { Preview } from "@storybook/react";
import "@webstudio-is/storybook-config/setup-fonts";
import { decorators } from "@webstudio-is/storybook-config/decorators";
import { color } from "../src/__generated__/figma-design-tokens";
const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
backgrounds: {
default: "White",
values: [
{ name: "White", value: "#ffffff" },
{ name: "Black", value: "#000000" },
{ name: "Panel", value: color.backgroundPanel },
{ name: "Maintenance Dark", value: color.maintenanceDark },
{ name: "Maintenance Medium", value: color.maintenanceMedium },
{ name: "Maintenance Light", value: color.maintenanceLight },
],
},
};
export default {
decorators,
parameters,
} satisfies Preview;