~james/core

core/web/src/lib/components/timeline/TimelineCard.svelte -rw-r--r-- 732 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
<script lang="ts">
	import type { Snippet } from "svelte";
	import LayerCard from "#lib/components/ui/LayerCard.svelte";
	import LayerCardPrimary from "#lib/components/ui/LayerCardPrimary.svelte";
	import LayerCardSecondary from "#lib/components/ui/LayerCardSecondary.svelte";

	let {
		header,
		children,
		footer,
		padded = true
	}: { header: Snippet; children: Snippet; footer?: Snippet; padded?: boolean } = $props();
</script>

<LayerCard class="defer-render-40">
	<LayerCardSecondary class="flex-wrap gap-word px-[calc(var(--spacing-sm)+1px)]">
		{@render header()}
	</LayerCardSecondary>
	<LayerCardPrimary padding={padded ? "small" : "none"}>
		{@render children()}
	</LayerCardPrimary>
	{@render footer?.()}
</LayerCard>