flotilla/src/lib/components/Divider.svelte

17 lines
456 B
Svelte
Raw Normal View History

2025-02-04 00:37:14 +00:00
<script lang="ts">
interface Props {
children?: import("svelte").Snippet
2025-02-06 01:05:41 +00:00
class?: string
2025-02-04 00:37:14 +00:00
}
2025-02-06 01:05:41 +00:00
const {children, ...props}: Props = $props()
2025-02-04 00:37:14 +00:00
</script>
2024-10-15 19:02:11 +00:00
<div class="flex items-center gap-2 p-2 text-xs uppercase opacity-50">
2025-02-06 01:05:41 +00:00
<div class="h-px flex-grow bg-base-content opacity-25 {props.class}"></div>
2025-02-04 00:37:14 +00:00
{#if children}
<p>{@render children?.()}</p>
2025-02-06 01:05:41 +00:00
<div class="h-px flex-grow bg-base-content opacity-25 {props.class}"></div>
{/if}
2024-09-20 18:00:41 +00:00
</div>