MCPcopy Create free account
hub / github.com/Muhammadsiddiq-code/Admin-dashboard / toggleTheme

Function toggleTheme

app.js:537–541  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

535}
536
537function toggleTheme() {
538 currentTheme = currentTheme === "light" ? "dark" : "light"
539 applyTheme(currentTheme)
540 localStorage.setItem("theme", currentTheme)
541}
542
543function applyTheme(theme) {
544 document.documentElement.setAttribute("data-theme", theme)

Callers

nothing calls this directly

Calls 1

applyThemeFunction · 0.85

Tested by

no test coverage detected