MCPcopy Create free account
hub / github.com/code-forge-io/react-router-devtools / toggle

Function toggle

docs/app/components/theme-toggle.tsx:12–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10 }, [])
11
12 const toggle = () => {
13 if (!theme) return
14 const next = theme === "dark" ? "light" : "dark"
15 applyTheme(next)
16 setTheme(next)
17 }
18
19 if (theme === null) {
20 return <IconButton aria-label="Loading theme..." name="SunMoon" />

Callers

nothing calls this directly

Calls 1

applyThemeFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…