(resolved: ResolvedTheme)
| 36 | const root = document.documentElement |
| 37 | |
| 38 | const apply = (resolved: ResolvedTheme) => { |
| 39 | setResolvedTheme(resolved) |
| 40 | if (resolved === 'light') { |
| 41 | root.classList.add('light') |
| 42 | } else { |
| 43 | root.classList.remove('light') |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | if (theme === 'system') { |
| 48 | const mq = window.matchMedia('(prefers-color-scheme: light)') |
no test coverage detected