File size: 659 Bytes
c6afb12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
32
33
34
35
<script lang="ts">
	import * as Empty from '$lib/components/ui/empty/index.js';
	import type { Snippet } from 'svelte';

	type Props = {
		icon?: Snippet;
		title: string;
		description?: string;
		content?: Snippet;
	};

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

<Empty.Root>
	<Empty.Header>
		{#if icon}
			<Empty.Media variant="icon">
				{@render icon()}
			</Empty.Media>
		{/if}
		<Empty.Title>{title}</Empty.Title>
		{#if description}
			<Empty.Description>
				{description}
			</Empty.Description>
		{/if}
	</Empty.Header>
	{#if content}
		<Empty.Content>
			{@render content()}
		</Empty.Content>
	{/if}
</Empty.Root>