diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx index 39f8940932..2eb24f8f0b 100644 --- a/.storybook/preview.tsx +++ b/.storybook/preview.tsx @@ -1,6 +1,6 @@ import React from "react"; import type { Preview } from "@storybook/react-vite"; -import { ThemeProvider, type ThemeMode } from "../src/browser/contexts/ThemeContext"; +import { ThemeProvider, type ResolvedThemeMode } from "../src/browser/contexts/ThemeContext"; import "../src/browser/styles/globals.css"; import { TUTORIAL_STATE_KEY, @@ -91,7 +91,7 @@ const preview: Preview = { // Theme provider (Story, context) => { // Default to dark if mode not set (e.g., Chromatic headless browser defaults to light) - const mode = (context.globals.theme as ThemeMode | undefined) ?? "dark"; + const mode = (context.globals.theme as ResolvedThemeMode | undefined) ?? "dark"; // Apply theme synchronously before React renders - critical for Chromatic snapshots if (typeof document !== "undefined") { diff --git a/index.html b/index.html index 20943cff1f..de6d634810 100644 --- a/index.html +++ b/index.html @@ -106,13 +106,13 @@