feat: make community list expandable
This commit is contained in:
1 parent
df06eca4e6
commit
04c89fed13
2 files changed
+37
-12
No files matched your search
@@ -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>
|
||||
Reference in new issue
Block a user