optimize: tweak navbar

This commit is contained in:
Xylight committed 2024-02-26 16:04:37 -08:00
1 parent 9be53724d2
commit 1d4bc14075
5 files changed
+365 -343

No files matched your search

@@ -0,0 +1,23 @@
<script lang="ts">
import { Button } from 'mono-svelte'
import { Icon, type IconSource } from 'svelte-hero-icons'
export let label: string
export let icon: IconSource | undefined = undefined
</script>
<Button
{...$$restProps}
class="px-3 py-1.5 max-md:py-0 max-md:px-0 max-md:h-9 max-md:w-9 {$$props.class ??
''}"
size="custom"
title={label}
>
{#if icon}
<Icon src={icon} mini size="16" />
{:else}
<slot name="icon" />
{/if}
<span class="max-md:hidden">{label}</span>
<slot />
</Button>