mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-10-23 03:27:27 +09:00
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
31 lines
886 B
TypeScript
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;
|