@@ -2,8 +2,8 @@ import type { LucideIcon } from "lucide-react";
22import { AlertTriangle , Info } from "lucide-react" ;
33import React from "react" ;
44// components
5- import type { TButtonVariant } from ".. /button" ;
6- import { Button } from ".. /button" ;
5+ import type { TButtonVariant } from "@plane/propel /button" ;
6+ import { Button } from "@plane/propel /button" ;
77import { cn } from "../utils" ;
88import { EModalPosition , EModalWidth } from "./constants" ;
99import { ModalCore } from "./modal-core" ;
@@ -28,6 +28,7 @@ type Props = {
2828 title : string ;
2929 variant ?: TModalVariant ;
3030 width ?: EModalWidth ;
31+ customIcon ?: React . ReactNode ;
3132} ;
3233
3334const VARIANT_ICONS : Record < TModalVariant , LucideIcon > = {
@@ -36,7 +37,7 @@ const VARIANT_ICONS: Record<TModalVariant, LucideIcon> = {
3637} ;
3738
3839const BUTTON_VARIANTS : Record < TModalVariant , TButtonVariant > = {
39- danger : "danger " ,
40+ danger : "error-fill " ,
4041 primary : "primary" ,
4142} ;
4243
@@ -62,6 +63,7 @@ export function AlertModalCore(props: Props) {
6263 title,
6364 variant = "danger" ,
6465 width = EModalWidth . XL ,
66+ customIcon,
6567 } = props ;
6668
6769 const Icon = VARIANT_ICONS [ variant ] ;
@@ -76,7 +78,7 @@ export function AlertModalCore(props: Props) {
7678 VARIANT_CLASSES [ variant ]
7779 ) }
7880 >
79- < Icon className = "size-5" aria-hidden = "true" />
81+ { customIcon ? < > { customIcon } </ > : < Icon className = "size-5" aria-hidden = "true" /> }
8082 </ span >
8183 ) }
8284 < div className = "text-center sm:text-left" >
@@ -85,7 +87,7 @@ export function AlertModalCore(props: Props) {
8587 </ div >
8688 </ div >
8789 < div className = "px-5 py-4 flex flex-col-reverse sm:flex-row sm:justify-end gap-2 border-t-[0.5px] border-subtle" >
88- < Button variant = "neutral-primary " onClick = { handleClose } >
90+ < Button variant = "secondary " onClick = { handleClose } >
8991 { secondaryButtonText }
9092 </ Button >
9193 < Button variant = { BUTTON_VARIANTS [ variant ] } tabIndex = { 1 } onClick = { handleSubmit } loading = { isSubmitting } >
0 commit comments