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

Function applyFamily

packages/app-core/src/components/OnboardingWizard.tsx:549–557  ·  view source on GitHub ↗
(family: ThemeFamily)

Source from the content-addressed store, hash-verified

547 onNext: () => void
548}): JSX.Element {
549 const applyFamily = (family: ThemeFamily): void => {
550 const prefersDark =
551 themeMode === 'dark' ||
552 (themeMode === 'auto' &&
553 typeof window !== 'undefined' &&
554 window.matchMedia('(prefers-color-scheme: dark)').matches)
555 const id = resolveAuto(family, prefersDark, themeId)
556 setTheme({ id, family, mode: themeMode })
557 }
558
559 const applyMode = (mode: ThemeMode): void => {
560 const prefersDark =

Callers 1

ThemeStepFunction · 0.85

Calls 1

resolveAutoFunction · 0.90

Tested by

no test coverage detected