design: make toasts look 8.26x better

This commit is contained in:
Xylight committed 2025-11-02 17:13:59 -08:00
1 parent 9ec5bb853a
commit 3b76cba87a
4 files changed
+72 -28

No files matched your search

+1 -9
View File
@@ -10,8 +10,6 @@
InformationCircle,
XMark,
} from 'svelte-hero-icons/dist'
import { expoOut } from 'svelte/easing'
import { fly } from 'svelte/transition'
import { type Toast, toastColors, toasts } from './toasts'
interface Props {
@@ -24,16 +22,10 @@
<div
class={[
toastColors[toast.type],
'relative rounded-xl overflow-hidden flex flex-row items-center gap-2 px-3 py-3 border border-slate-200 dark:border-zinc-800',
'relative rounded-2xl overflow-hidden flex flex-row items-center gap-1 px-2 py-2 backdrop-blur-xl',
'bg-white dark:bg-zinc-925 shadow-lg',
toast.long ? 'w-full max-w-lg' : 'w-80',
]}
transition:fly={{
duration: 600,
y: 8,
opacity: 0,
easing: expoOut,
}}
>
{#if toast.loading}
<div class="relative m-2 ml-4 shrink-0">
+4 -4
View File
@@ -3,10 +3,10 @@ import { writable } from 'svelte/store'
type ToastType = keyof typeof toastColors
export const toastColors = {
error: 'text-red-600 dark:text-red-400',
warning: 'text-yellow-600 dark:text-yellow-400',
success: 'text-green-600 dark:text-green-400',
info: '',
error: 'container-error',
warning: 'container-warning',
success: 'container-success',
info: 'container-info',
}
export interface Toast {