fix: fix toast colors
This commit is contained in:
1 parent
3ef90fdf26
commit
384a200891
2 files changed
+9
-3
No files matched your search
@@ -1,5 +1,9 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { type Toast, toasts } from '$lib/components/ui/toasts/toasts'
|
import {
|
||||||
|
type Toast,
|
||||||
|
toasts,
|
||||||
|
toastColors,
|
||||||
|
} from '$lib/components/ui/toasts/toasts'
|
||||||
import {
|
import {
|
||||||
InformationCircle,
|
InformationCircle,
|
||||||
ExclamationTriangle,
|
ExclamationTriangle,
|
||||||
@@ -14,7 +18,9 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="{toast.type} relative w-80 rounded-md overflow-hidden flex flex-row items-center"
|
class="{toastColors[
|
||||||
|
toast.type
|
||||||
|
]} relative w-80 rounded-md overflow-hidden flex flex-row items-center"
|
||||||
transition:fly={{
|
transition:fly={{
|
||||||
duration: 300,
|
duration: 300,
|
||||||
y: 8,
|
y: 8,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { writable } from 'svelte/store'
|
|||||||
|
|
||||||
type ToastType = keyof typeof toastColors
|
type ToastType = keyof typeof toastColors
|
||||||
|
|
||||||
const toastColors = {
|
export const toastColors = {
|
||||||
error: 'bg-red-500 text-white border border-red-600',
|
error: 'bg-red-500 text-white border border-red-600',
|
||||||
warning: 'bg-yellow-400 text-black border border-yellow-500',
|
warning: 'bg-yellow-400 text-black border border-yellow-500',
|
||||||
success: 'bg-green-400 text-black border border-green-500',
|
success: 'bg-green-400 text-black border border-green-500',
|
||||||
|
|||||||
Reference in new issue
Block a user