MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / pickFamily

Function pickFamily

packages/app-core/src/components/SettingsModal.tsx:731–738  ·  view source on GitHub ↗
(family: ThemeFamily)

Source from the content-addressed store, hash-verified

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') {

Callers 1

SettingsModalFunction · 0.85

Calls 1

resolveAutoFunction · 0.90

Tested by

no test coverage detected