2025-12-02 09:54:38 +01:00
|
|
|
<script lang="ts">
|
|
|
|
|
import { cn, type WithElementRef } from '../../tools';
|
|
|
|
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
|
|
|
|
|
|
|
|
let {
|
|
|
|
|
ref = $bindable(null),
|
|
|
|
|
class: className,
|
2026-03-09 11:18:22 +01:00
|
|
|
isSticky = false,
|
2025-12-02 09:54:38 +01:00
|
|
|
children,
|
|
|
|
|
...restProps
|
2026-03-09 11:18:22 +01:00
|
|
|
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
|
|
|
isSticky?: boolean;
|
|
|
|
|
} = $props();
|
2025-12-02 09:54:38 +01:00
|
|
|
</script>
|
|
|
|
|
|
2026-03-09 11:18:22 +01:00
|
|
|
<div
|
|
|
|
|
bind:this={ref}
|
|
|
|
|
data-slot="page-header"
|
|
|
|
|
class={cn('ui:flex ui:my-4 ui:py-2 ui:flex-col', isSticky && 'ui:sticky ui:top-13 ui:z-10 ui:bg-white', className)}
|
|
|
|
|
{...restProps}
|
|
|
|
|
>
|
2025-12-02 09:54:38 +01:00
|
|
|
<div class="ui:flex ui:items-start ui:justify-between ui:gap-4">
|
|
|
|
|
{@render children?.()}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|