impr: merge mono-ui with photon (#455)
This commit is contained in:
1 parent
16075f72f2
commit
180d6fcc0d
40 files changed
+2024
-1
No files matched your search
@@ -0,0 +1,37 @@
|
||||
<script lang="ts">
|
||||
import { Icon, type IconSource } from 'svelte-hero-icons'
|
||||
export let icon: IconSource | undefined = undefined
|
||||
export let title: string | undefined = undefined
|
||||
export let description: string | undefined = undefined
|
||||
</script>
|
||||
|
||||
<div class="text-slate-700 dark:text-zinc-300 flex flex-col justify-center items-center gap-2">
|
||||
{#if icon || $$slots.icon}
|
||||
<div class="border border-slate-200 dark:border-zinc-700 dark:bg-zinc-800 p-3 rounded-full">
|
||||
{#if $$slots.icon}
|
||||
<slot name="icon" />
|
||||
{:else if icon}
|
||||
<Icon src={icon} size="28" />
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="flex flex-col gap-1 text-center">
|
||||
<h1 class="text-slate-900 dark:text-zinc-100 text-lg font-medium">
|
||||
{#if $$slots.title}
|
||||
<slot name="title" />
|
||||
{:else if title}
|
||||
{title}
|
||||
{/if}
|
||||
</h1>
|
||||
{#if description || $$slots.description}
|
||||
<p class="text-sm text-center font-normal">
|
||||
{#if $$slots.description}
|
||||
<slot name="description" />
|
||||
{:else if description}
|
||||
{description}
|
||||
{/if}
|
||||
</p>
|
||||
{/if}
|
||||
</div>
|
||||
<slot />
|
||||
</div>
|
||||
Reference in new issue
Block a user