(family: ThemeFamily)
| 729 | }, [themeFamily, effectiveMode]) |
| 730 | |
| 731 | const pickFamily = (family: ThemeFamily): void => { |
| 732 | // Custom themes have their own picker section. |
| 733 | if (family === 'custom') return |
| 734 | // `resolveAuto` is the single source of truth for a family's default variant |
| 735 | // (it also carries the current variant across modes), so every built-in |
| 736 | // family resolves here automatically — no separate map to keep in sync. |
| 737 | setTheme({ id: resolveAuto(family, effectiveMode === 'dark', themeId), family, mode: themeMode }) |
| 738 | } |
| 739 | |
| 740 | const pickMode = (mode: ThemeMode): void => { |
| 741 | if (mode === 'auto') { |
no test coverage detected