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

Function ThemeSwitchIconButton

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

Source from the content-addressed store, hash-verified

56}
57
58export function ThemeSwitchIconButton() {
59 const { iconToUse, iconText, toggleTheme, mounted } = useThemeSwitch()
60
61 return (
62 <button
63 style={{ opacity: mounted ? 1 : 0 }}
64 onClick={toggleTheme}
65 aria-label={iconText}
66 className={switchStyle}
67 >
68 <ButtonIcon icon={iconToUse} />
69 </button>
70 )
71}

Callers

nothing calls this directly

Calls 1

useThemeSwitchFunction · 0.85

Tested by

no test coverage detected