design: update button and toast components

This commit is contained in:
James Xylight committed 2025-07-10 17:25:44 -07:00
1 parent 56e80351ab
commit 64c2e7f559
6 files changed
+85 -127

No files matched your search

+12 -11
View File
@@ -18,7 +18,7 @@
<script lang="ts">
import { Button } from 'mono-svelte'
import { onDestroy } from 'svelte'
import { Icon, XMark } from 'svelte-hero-icons'
import { Icon, XCircle, XMark } from 'svelte-hero-icons'
import { expoOut } from 'svelte/easing'
import { fly, slide } from 'svelte/transition'
@@ -44,19 +44,20 @@
out:slide={{ duration: 400, delay: 400, easing: expoOut }}
>
<div
class="flex flex-row p-1.5 bg-red-500/20 rounded-3xl border border-red-500/50 gap-2 items-center"
class="flex flex-row p-1.5 bg-red-100/50 dark:bg-red-900/10 rounded-xl border border-red-300/40 gap-2 items-center"
in:fly={{ y: -8, duration: 400, delay: 200, opacity: 0, easing: expoOut }}
out:fly={{ y: -8, duration: 400, opacity: 0, easing: expoOut }}
>
<div class="rounded-full p-0.5 bg-red-400">
<Icon
src={XMark}
class="text-red-500 dark:text-red-400 p-px rounded-full bg-white dark:bg-zinc-950"
size="20"
micro
/>
</div>
<div class="flex flex-col text-sm">
<Icon
src={XCircle}
size="28"
mini
class={[
'relative self-center shrink-0 p-0.5 rounded-full',
'bg-red-400 dark:bg-red-400 dark:text-red-900 text-red-50',
]}
/>
<div class="flex flex-col text-sm font-medium gap-4">
{#each scopedErrors as error}
{error.message}
{/each}
@@ -178,7 +178,7 @@
? $t('cards.community.subscribed')
: $t('cards.community.subscribe')}
color={isSubscribed(community.subscribed)
? 'elevatedLow'
? 'secondary'
: 'primary'}
class="{isSubscribed(community.subscribed)
? 'text-slate-600 dark:text-zinc-400'