feat: make community list expandable

This commit is contained in:
Xylight committed 2024-02-26 17:30:12 -08:00
1 parent df06eca4e6
commit 04c89fed13
2 files changed
+37 -12

No files matched your search

+24 -11
View File
@@ -1,15 +1,28 @@
<script>
import { Disclosure } from "mono-svelte"
import { ChevronDown, Icon } from "svelte-hero-icons"
<script lang="ts">
import { Disclosure } from 'mono-svelte'
import { ChevronDown, Icon } from 'svelte-hero-icons'
export let open: boolean = false
</script>
<Disclosure class="items-start justify-items-start gap-2 {$$props.class}">
<div slot="summary" class="font-medium w-full text-left flex flex-row items-center justify-between">
<div class="flex flex-row gap-1 items-center"><slot name="title" /></div>
<Icon src={ChevronDown} size="20" mini />
<Disclosure
bind:open
class="items-start justify-items-start gap-2 {$$props.class}"
>
<div
slot="summary"
class="font-medium w-full text-left flex flex-row items-center justify-between"
>
<div class="flex flex-row gap-1 items-center w-full">
<slot name="title" />
</div>
<Icon
src={ChevronDown}
size="20"
mini
class="{open ? 'rotate-180' : ''} transition-transform"
/>
</div>
<div class="pt-2">
<slot /></div>
</Disclosure>
<slot />
</div>
</Disclosure>