feat: change the way placeholders work
This commit is contained in:
1 parent
8aa62b046e
commit
e86d436c86
12 files changed
+121
-96
No files matched your search
@@ -1,18 +1,29 @@
|
||||
<script lang="ts">
|
||||
import { Icon, type IconSource } from 'svelte-hero-icons'
|
||||
|
||||
export let icon: IconSource | undefined = undefined
|
||||
|
||||
export let title: string
|
||||
export let description: string | undefined = undefined
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="text-slate-600 dark:text-zinc-400 flex flex-col justify-center items-center gap-1"
|
||||
class="text-slate-700 dark:text-zinc-300 flex flex-col justify-center items-center gap-2"
|
||||
>
|
||||
{#if $$slots.icon}
|
||||
{#if icon}
|
||||
<div
|
||||
class="bg-slate-100 border border-slate-200 dark:border-zinc-700 dark:bg-zinc-800 p-3 rounded-full"
|
||||
class="border border-slate-200 dark:border-zinc-700 dark:bg-zinc-800 p-3 rounded-full"
|
||||
>
|
||||
<slot name="icon" />
|
||||
<Icon src={icon} size="28" />
|
||||
</div>
|
||||
{/if}
|
||||
{#if $$slots.title}
|
||||
<h1 class="font-bold text-lg"><slot name="title" /></h1>
|
||||
{/if}
|
||||
{#if $$slots.description}
|
||||
<p class="text-sm text-center"><slot name="description" /></p>
|
||||
{/if}
|
||||
<slot name="action" />
|
||||
<div class="flex flex-col gap-1 text-center">
|
||||
<h1 class="text-slate-900 dark:text-zinc-100 text-lg font-medium">
|
||||
{title}
|
||||
</h1>
|
||||
{#if description}
|
||||
<p class="text-sm text-center font-normal">{description}</p>
|
||||
{/if}
|
||||
</div>
|
||||
<slot />
|
||||
</div>
|
||||
Reference in new issue
Block a user