Commit 075e156
committed
fix: apply theme synchronously in Storybook decorator for Chromatic
- Use initialGlobals instead of deprecated defaultValue
- Apply data-theme attribute synchronously before React renders
- Default to dark theme when globals not set (Chromatic headless defaults to light)
This ensures Chromatic captures the correct theme in snapshots.1 parent 3332f68 commit 075e156
1 file changed
+13
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | 71 | | |
73 | 72 | | |
74 | 73 | | |
| |||
79 | 78 | | |
80 | 79 | | |
81 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
82 | 84 | | |
83 | 85 | | |
84 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
85 | 95 | | |
86 | 96 | | |
87 | 97 | | |
88 | | - | |
| 98 | + | |
89 | 99 | | |
90 | 100 | | |
91 | 101 | | |
| |||
0 commit comments