Files
photon-tbw/src/routes/settings/Section.svelte
T
2025-09-24 17:12:19 -07:00

30 lines
627 B
Svelte

<script lang="ts">
import Expandable from 'mono-svelte/disclosure/Expandable.svelte'
import CommonList from '$comp/ui/layout/CommonList.svelte'
interface Props {
title: string
id: string
open?: boolean
children?: import('svelte').Snippet
}
let {
title: passedTitle,
id,
open = $bindable(true),
children,
}: Props = $props()
</script>
<Expandable bind:open class="border-y-0">
{#snippet title()}
<h2 class="text-lg font-medium text-inherit" {id}>
<span>{passedTitle}</span>
</h2>
{/snippet}
<CommonList>
{@render children?.()}
</CommonList>
</Expandable>