Files
shared/packages/web-ui/src/lib/components/PageHeader.svelte
T
Gabriel20xx 2f57554154
Lint / Lint (Node/Svelte) (push) Successful in 23s
Lint / Lint (Go) (push) Successful in 16s
Lint / Lint (Python) (push) Successful in 9s
Tests / Test (Node/Svelte) (push) Successful in 14s
Tests / Test (Go) (push) Successful in 17s
Tests / Test (Python) (push) Successful in 9s
Extend shared UI component customization
2026-08-04 16:53:36 +02:00

36 lines
595 B
Svelte

<script lang="ts">
import type { Snippet } from 'svelte';
let {
actions,
children,
description = '',
subtitle = '',
title
}: {
actions?: Snippet;
children?: Snippet;
description?: string;
subtitle?: string;
title: string;
} = $props();
const supportingText = $derived(description || subtitle);
</script>
<div class="sc-page-header">
<div>
<h1>{title}</h1>
{#if supportingText}
<p>{supportingText}</p>
{/if}
{@render children?.()}
</div>
{#if actions}
<div>
{@render actions()}
</div>
{/if}
</div>