~james/core

core/web/src/lib/components/welcome/StepHeader.svelte -rw-r--r-- 728 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
31
<script module lang="ts">
	import { tv, type VariantProps } from "tailwind-variants";

	export const stepHeader = tv({
		slots: {
			root: "flex flex-col gap-xs",
			title: "typography-heading-3 font-semibold text-foreground-default",
			subtitle: "typography-paragraph-regular text-foreground-muted"
		}
	});

	export type StepHeaderVariants = VariantProps<typeof stepHeader>;
</script>

<script lang="ts">
	interface Props {
		title: string;
		subtitle?: string;
	}

	let { title, subtitle }: Props = $props();

	const slot = stepHeader();
</script>

<header class={slot.root()}>
	<h2 data-testid="stepHeaderTitle" class={slot.title()}>{title}</h2>
	{#if subtitle}
		<p class={slot.subtitle()}>{subtitle}</p>
	{/if}
</header>