Skip to content

Commit f33f6a7

Browse files
committed
🤖 debug: add logging to verify Chromatic modes populate context.globals.theme
1 parent dac3891 commit f33f6a7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎.storybook/preview.tsx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,12 @@ const preview: Preview = {
2121
decorators: [
2222
(Story, context) => {
2323
const mode = context.globals.theme as ThemeMode | undefined;
24+
console.log('🔍 Storybook decorator - Story:', context.name);
25+
console.log('🔍 context.globals:', context.globals);
26+
console.log('🔍 Theme mode from globals:', mode);
2427
// Default to dark when no mode is explicitly set (e.g., Latest view)
2528
const forcedTheme = mode ?? "dark";
29+
console.log('🔍 forcedTheme passed to ThemeProvider:', forcedTheme);
2630
return (
2731
<ThemeProvider forcedTheme={forcedTheme}>
2832
<Story />

0 commit comments

Comments
 (0)