()
| 32 | }; |
| 33 | |
| 34 | const apply = () => { |
| 35 | const resolved = resolve(); |
| 36 | setResolvedTheme(resolved); |
| 37 | // Dark is the default; add `.light` class for light theme |
| 38 | document.documentElement.classList.toggle("light", resolved === "light"); |
| 39 | }; |
| 40 | |
| 41 | apply(); |
| 42 | mediaQuery.addEventListener("change", apply); |
no test coverage detected