~james/core

core/web/src/lib/components/settings/SettingsHeader.svelte -rw-r--r-- 680 bytes
452f17b7 — james chore(import): snapshot james.dad.town/core at f70c71c7696a 15 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<script lang="ts">
	import type { Snippet } from "svelte";

	interface Props {
		title: string;
		name?: string;
		description?: string;
		action?: Snippet;
	}

	let { title, name, description, action }: Props = $props();
</script>

<div class="flex w-full flex-col justify-center gap-md">
	<div class="flex flex-wrap items-start justify-between gap-md">
		<h1
			data-testid="settingsHeaderTitle"
			data-name={name}
			class="min-w-0 flex-1 typography-heading-2 text-foreground-default"
		>
			{title}
		</h1>
		{#if action}
			{@render action()}
		{/if}
	</div>
	{#if description}
		<p class="typography-paragraph-regular text-foreground-muted">{description}</p>
	{/if}
</div>