commit before upgrading to tailwind 4

This commit is contained in:
vcoppe
2025-06-08 16:32:41 +02:00
parent 228ad1044e
commit f0230d4634
129 changed files with 4033 additions and 4468 deletions

View File

@@ -1,23 +1,21 @@
<script lang="ts">
import { Button } from '$lib/components/ui/button';
import { Moon, Sun } from 'lucide-svelte';
import { mode, setMode, systemPrefersMode } from 'mode-watcher';
import { mode, setMode } from 'mode-watcher';
import { _ } from '$lib/i18n';
export let size = '20';
$: selectedMode = $mode ?? $systemPrefersMode ?? 'light';
</script>
<Button
variant="ghost"
class="h-8 px-1.5 {$$props.class ?? ''}"
on:click={() => {
setMode(selectedMode === 'light' ? 'dark' : 'light');
setMode(mode.current === 'light' ? 'dark' : 'light');
}}
aria-label={$_('menu.mode')}
>
{#if selectedMode === 'light'}
{#if mode.current === 'light'}
<Sun {size} />
{:else}
<Moon {size} />