()
| 6 | } |
| 7 | |
| 8 | export function getCurrentTheme(): "light" | "dark" { |
| 9 | if (typeof document === "undefined") return "light" |
| 10 | const theme = document.documentElement.getAttribute("data-theme") |
| 11 | return theme === "dark" ? "dark" : "light" |
| 12 | } |
| 13 | |
| 14 | export function applyTheme(theme: "light" | "dark") { |
| 15 | document.documentElement.setAttribute("data-theme", theme) |
no outgoing calls
no test coverage detected
searching dependent graphs…