Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
*/

import "../src/styles.css";
import type { Preview } from "@storybook/react-vite";
import type { Preview, Decorator } from "@storybook/react-vite";

const withColorMode: Decorator = (Story, context) => {
return <Story />;
};

const preview: Preview = {
parameters: {
Expand All @@ -33,6 +37,25 @@ const preview: Preview = {
test: "todo",
},
},

globalTypes: {
colorMode: {
description: "Global color mode for components",
defaultValue: "system",
toolbar: {
title: "Color Mode",
icon: "circlehollow",
items: [
{ value: "light", icon: "sun", title: "Light" },
{ value: "dark", icon: "moon", title: "Dark" },
{ value: "system", icon: "browser", title: "System" },
],
dynamicTitle: true,
},
},
},

decorators: [withColorMode],
};

export default preview;
3 changes: 3 additions & 0 deletions packages/serverless-workflow-diagram-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"build:dev": "pnpm clean && tsc -p tsconfig.json && vite build",
"build:prod": "pnpm lint && pnpm clean && tsc -p tsconfig.json && vite build && pnpm test && pnpm test-e2e",
"test": "vitest run --passWithNoTests",
"test:browser": "vitest run --passWithNoTests --browser.enabled=true --browser.name=playwright --browser.headless",
"start": "storybook dev -p 6006 --no-open",
"build:storybook": "pnpm clean:storybook && storybook build --output-dir ./dist-storybook",
"test-e2e": "playwright test",
Expand Down Expand Up @@ -65,6 +66,8 @@
"@types/node": "catalog:",
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"@vitest/browser": "catalog:",
"@vitest/browser-playwright": "^4.1.5",
"@vitest/coverage-v8": "catalog:",
"@vitest/ui": "catalog:",
"jsdom": "catalog:",
Expand Down

This file was deleted.

51 changes: 0 additions & 51 deletions packages/serverless-workflow-diagram-editor/stories/Button.tsx

This file was deleted.

Loading