feat: add sidebar collapsing at small sizes

This commit is contained in:
Xyphyn committed 2023-10-07 11:37:20 -07:00
1 parent b367f22277
commit b9e74944c8
7 files changed
+37 -24

No files matched your search

@@ -1,4 +1,5 @@
<script lang="ts">
import { userSettings } from '$lib/settings.js'
import { Button } from 'mono-svelte'
</script>
@@ -7,7 +8,12 @@
color="tertiary"
alignment="left"
on:click
class="hover:bg-slate-100 font-normal {$$props.class}"
class="hover:bg-slate-100 font-normal {$userSettings.expandSidebar
? ''
: 'max-lg:!p-1 [&>*]:max-lg:!justify-center'} {$$props.class}"
>
<slot />
<div class={$userSettings.expandSidebar ? 'contents' : 'max-lg:hidden'}>
<slot name="label" />
</div>
</Button>