flotilla/src/lib/components/Divider.svelte

18 lines
444 B
Svelte
Raw Normal View History

2025-02-04 00:37:14 +00:00
<script lang="ts">
import type {Snippet} from "svelte"
2025-02-04 00:37:14 +00:00
interface Props {
children?: Snippet
2025-02-04 00:37:14 +00:00
}
const {children, ...props}: Props = $props()
2025-02-04 00:37:14 +00:00
</script>
<div class="flex items-center gap-2 p-2 text-xs uppercase text-subtle">
<div class="h-px grow" style="background-color: var(--line)"></div>
2025-02-04 00:37:14 +00:00
{#if children}
<p>{@render children?.()}</p>
<div class="h-px grow" style="background-color: var(--line)"></div>
{/if}
2024-09-20 18:00:41 +00:00
</div>