misc: redesign placeholder

This commit is contained in:
Xylight committed 2024-08-03 19:05:06 -07:00
1 parent 8216901429
commit 319c896e55
3 files changed
+39 -23

No files matched your search

+19 -23
View File
@@ -5,34 +5,30 @@
export let title: string
export let description: string | undefined = undefined
export let center: boolean = true
export let center: boolean = false
</script>
<div
class="text-slate-700 dark:text-zinc-300 flex flex-col {center
? 'justify-center items-center'
: 'justify-start items-start'} gap-2 {$$props.class}"
class="text-slate-700 dark:text-zinc-300 flex flex-col w-max mx-auto items-center gap-4 {$$props.class}"
>
{#if icon}
<div
class="border border-slate-200 dark:border-zinc-700 dark:bg-zinc-800 p-3 rounded-full"
>
<Icon src={icon} size="28" />
</div>
{/if}
<div
class="flex flex-col gap-1 {center
? 'text-center'
: 'text-left'} {$$props.class}"
>
<h1 class="text-slate-900 dark:text-zinc-100 text-lg font-medium">
{title}
</h1>
{#if description}
<p class="text-sm {center ? 'text-center' : 'text-left'} font-normal">
{description}
</p>
<div class="flex flex-row gap-4 items-center max-w-sm">
{#if icon}
<div
class="border border-slate-200 dark:border-zinc-800 dark:bg-zinc-900 p-3 rounded-full"
>
<Icon src={icon} size="28" />
</div>
{/if}
<div class={$$props.class}>
<h1 class="text-slate-900 dark:text-zinc-100 text-lg font-medium">
{title}
</h1>
{#if description}
<p class="text-sm {center ? 'text-center' : 'text-left'} font-normal">
{description}
</p>
{/if}
</div>
</div>
<slot />
</div>