Skip to content

Commit 46845a9

Browse files
committed
🤖 fix(chromatic): keep Latest default theme light to preserve baseline; still allow manual toggle
1 parent df7ff1f commit 46845a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎.storybook/preview.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ const applyStorybookTheme = (mode: ThemeMode) => {
3535

3636
const syncStorybookTheme = (mode?: ThemeMode): ThemeMode => {
3737
if (typeof window === "undefined") {
38-
return mode ?? "dark";
38+
return mode ?? "light"; // Keep default aligned with baseline to avoid Chromatic diffs
3939
}
4040

4141
const stored = window.localStorage.getItem(UI_THEME_KEY);
4242
const persisted = stored ? (JSON.parse(stored) as ThemeMode) : undefined;
43-
const resolved = mode ?? persisted ?? "dark";
43+
const resolved = mode ?? persisted ?? "light"; // Default to light for Latest when unset
4444
applyStorybookTheme(resolved);
4545
return resolved;
4646
};

0 commit comments

Comments
 (0)