@@ -6,6 +6,7 @@ import { useTypedLoaderData } from "remix-typedjson";
6
6
import { loader } from "~/root" ;
7
7
import { useEffect } from "react" ;
8
8
import { Paragraph } from "./Paragraph" ;
9
+ import { cn } from "~/utils/cn" ;
9
10
10
11
const defaultToastDuration = 5000 ;
11
12
const permanentToastDuration = 60 * 60 * 24 * 1000 ;
@@ -39,23 +40,27 @@ export function ToastUI({
39
40
} ) {
40
41
return (
41
42
< div
42
- className = { `self-end rounded-md border border-grid-bright bg-background-dimmed` }
43
+ className = { cn (
44
+ "self-end rounded-md border border-grid-bright bg-background-dimmed" ,
45
+ variant === "success" && "border-success" ,
46
+ variant === "error" && "border-error"
47
+ ) }
43
48
style = { {
44
49
width : toastWidth ,
45
50
} }
46
51
>
47
52
< div className = "flex w-full items-start gap-2 rounded-lg p-3" >
48
53
{ variant === "success" ? (
49
- < CheckCircleIcon className = "mt-1 h -6 min-h-[1.5rem] w-6 min-w-[1.5rem] text-green-600 " />
54
+ < CheckCircleIcon className = "mt-1 size -6 min-w-6 text-success " />
50
55
) : (
51
- < ExclamationCircleIcon className = "mt-1 h -6 w-6 min-w-[1.5rem] text-rose-600 " />
56
+ < ExclamationCircleIcon className = "mt-1 size -6 min-w-6 text-error " />
52
57
) }
53
- < Paragraph className = "py-1 text-text-dimmed " > { message } </ Paragraph >
58
+ < Paragraph className = "py-1 text-text-bright " > { message } </ Paragraph >
54
59
< button
55
60
className = "hover:bg-midnight-800 ms-auto rounded p-2 text-text-dimmed transition hover:text-text-bright"
56
61
onClick = { ( ) => toast . dismiss ( t ) }
57
62
>
58
- < XMarkIcon className = "h-4 w -4" />
63
+ < XMarkIcon className = "size -4" />
59
64
</ button >
60
65
</ div >
61
66
</ div >
0 commit comments