minor fixes

This commit is contained in:
vcoppe
2025-10-20 19:53:42 +02:00
parent 2ca53c1004
commit a78bd8d7ca
32 changed files with 40 additions and 48 deletions

View File

@@ -3,22 +3,19 @@
import { Moon, Sun } from '@lucide/svelte';
import { mode, setMode } from 'mode-watcher';
import { i18n } from '$lib/i18n.svelte';
export let size = '20';
</script>
<Button
variant="ghost"
size="icon"
class="h-8 px-1.5 {$$props.class ?? ''}"
onclick={() => {
setMode(mode.current === 'light' ? 'dark' : 'light');
}}
aria-label={i18n._('menu.mode')}
>
{#if mode.current === 'light'}
<Sun {size} />
<Sun />
{:else}
<Moon {size} />
<Moon />
{/if}
</Button>