Alternative web application for the pdsadmin command
at main 21 lines 487 B view raw
1import { useToasts } from "../../atoms/toast"; 2import { cn } from "../../utils/cn"; 3 4export function Toaster() { 5 const toasts = useToasts(); 6 return ( 7 <div className="toast"> 8 {toasts.map((toast) => ( 9 <div 10 key={toast.id} 11 className={cn("alert", { 12 "alert-success": toast.level === "success", 13 "alert-error": toast.level === "error", 14 })} 15 > 16 {toast.message} 17 </div> 18 ))} 19 </div> 20 ); 21}