()
| 25 | ]; |
| 26 | |
| 27 | export function getSystemTheme(): 'light' | 'dark' { |
| 28 | if (typeof window === 'undefined') return 'light'; |
| 29 | return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'; |
| 30 | } |
| 31 | |
| 32 | export function applyTheme(theme: Theme) { |
| 33 | if (typeof window === 'undefined') return; |