MCPcopy Create free account
hub / github.com/chakra-ui/panda / toggleTheme

Function toggleTheme

website/src/components/theme-switch-button.tsx:16–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14 const isDark = mounted && resolvedTheme === 'dark'
15
16 const toggleTheme = () => setTheme(isDark ? 'light' : 'dark')
17
18 const iconToUse: 'Moon' | 'Sun' = isDark ? 'Moon' : 'Sun'
19 const iconText = isDark ? 'Dark' : 'Light'

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected