@@ -6,6 +6,7 @@ import { useTypedLoaderData } from "remix-typedjson";
66import { loader } from "~/root" ;
77import { useEffect } from "react" ;
88import { Paragraph } from "./Paragraph" ;
9+ import { cn } from "~/utils/cn" ;
910
1011const defaultToastDuration = 5000 ;
1112const permanentToastDuration = 60 * 60 * 24 * 1000 ;
@@ -39,23 +40,27 @@ export function ToastUI({
3940} ) {
4041 return (
4142 < 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+ ) }
4348 style = { {
4449 width : toastWidth ,
4550 } }
4651 >
4752 < div className = "flex w-full items-start gap-2 rounded-lg p-3" >
4853 { 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 " />
5055 ) : (
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 " />
5257 ) }
53- < Paragraph className = "py-1 text-text-dimmed " > { message } </ Paragraph >
58+ < Paragraph className = "py-1 text-text-bright " > { message } </ Paragraph >
5459 < button
5560 className = "hover:bg-midnight-800 ms-auto rounded p-2 text-text-dimmed transition hover:text-text-bright"
5661 onClick = { ( ) => toast . dismiss ( t ) }
5762 >
58- < XMarkIcon className = "h-4 w -4" />
63+ < XMarkIcon className = "size -4" />
5964 </ button >
6065 </ div >
6166 </ div >
0 commit comments