Commit dac3891
committed
🤖 fix(storybook): use forcedTheme as initial value to prevent flash
When forcedTheme is provided (e.g., from Chromatic mode variants),
use it as the initial value for usePersistedState to ensure the
correct theme is applied on first render without flashing through
the default/persisted theme.
This ensures light mode stories render in light theme and dark mode
stories render in dark theme, rather than both appearing as dark.1 parent e3fbdbf commit dac3891
1 file changed
+8
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
57 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
58 | 63 | | |
59 | 64 | | |
60 | 65 | | |
| |||
0 commit comments