feat: Dark mode #15

Merged
aniva merged 15 commits from styling/dark-mode into main 2024-10-15 19:32:16 -07:00
1 changed files with 2 additions and 1 deletions
Showing only changes of commit 571d54a975 - Show all commits

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { Moon, Sun } from 'lucide-svelte';
import { theme } from '$lib/theme'
import { theme, setTheme } from '$lib/theme'
function toggleTheme() {
theme.update((currentTheme) => {
@ -14,6 +14,7 @@
} else {
document.documentElement.classList.add('dark');
}
setTheme(newTheme);
return newTheme
})
}