diff --git a/ui/src/components/ConfirmDialog.tsx b/ui/src/components/ConfirmDialog.tsx index 9cd9c9ba..82907601 100644 --- a/ui/src/components/ConfirmDialog.tsx +++ b/ui/src/components/ConfirmDialog.tsx @@ -1,10 +1,10 @@ -import { CheckCircleIcon } from "@heroicons/react/24/outline"; import { CloseButton } from "@headlessui/react"; -import { LuInfo, LuOctagonAlert, LuTriangleAlert } from "react-icons/lu"; +import { LuCircleAlert, LuInfo, LuTriangleAlert } from "react-icons/lu"; import { Button } from "@/components/Button"; import Modal from "@/components/Modal"; import { cx } from "@/cva.config"; + type Variant = "danger" | "success" | "warning" | "info"; interface ConfirmDialogProps { @@ -21,27 +21,23 @@ interface ConfirmDialogProps { const variantConfig = { danger: { - icon: LuOctagonAlert, - iconClass: "text-red-600", - iconBgClass: "bg-red-100 border border-red-500/90", + icon: LuCircleAlert, + iconClass: "text-red-600 dark:text-red-400", buttonTheme: "danger", }, success: { - icon: CheckCircleIcon, - iconClass: "text-green-600", - iconBgClass: "bg-green-100 border border-green-500/90", + icon: LuCircleAlert, + iconClass: "text-emerald-600 dark:text-emerald-400", buttonTheme: "primary", }, warning: { icon: LuTriangleAlert, - iconClass: "text-yellow-600", - iconBgClass: "bg-yellow-100 border border-yellow-500/90", + iconClass: "text-amber-600 dark:text-amber-400", buttonTheme: "primary", }, info: { icon: LuInfo, - iconClass: "text-blue-600", - iconBgClass: "bg-blue-100 border border-blue-500/90", + iconClass: "text-slate-700 dark:text-slate-300", buttonTheme: "primary", }, } as Record< @@ -49,7 +45,6 @@ const variantConfig = { { icon: React.ElementType; iconClass: string; - iconBgClass: string; buttonTheme: "danger" | "primary" | "blank" | "light" | "lightDanger"; } >; @@ -65,7 +60,7 @@ export function ConfirmDialog({ onConfirm, isConfirming = false, }: ConfirmDialogProps) { - const { icon: Icon, iconClass, iconBgClass, buttonTheme } = variantConfig[variant]; + const { icon: Icon, iconClass, buttonTheme } = variantConfig[variant]; const handleKeyDown = (e: React.KeyboardEvent) => { if (e.key === "Escape") { @@ -77,29 +72,22 @@ export function ConfirmDialog({ return (
-
-
-
-
-
-
-
-

+
+
+
+
+