diff options
Diffstat (limited to 'FrontEnd/src/views/common/dialog/ConfirmDialog.tsx')
-rw-r--r-- | FrontEnd/src/views/common/dialog/ConfirmDialog.tsx | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/FrontEnd/src/views/common/dialog/ConfirmDialog.tsx b/FrontEnd/src/views/common/dialog/ConfirmDialog.tsx deleted file mode 100644 index dbbd15c6..00000000 --- a/FrontEnd/src/views/common/dialog/ConfirmDialog.tsx +++ /dev/null @@ -1,59 +0,0 @@ -import { useC, Text, ThemeColor } from "@/views/common/common"; - -import Dialog from "./Dialog"; -import DialogContainer from "./DialogContainer"; - -export default function ConfirmDialog({ - open, - onClose, - onConfirm, - title, - body, - color, - bodyColor, -}: { - open: boolean; - onClose: () => void; - onConfirm: () => void; - title: Text; - body: Text; - color?: ThemeColor; - bodyColor?: ThemeColor; -}) { - const c = useC(); - - return ( - <Dialog onClose={onClose} open={open}> - <DialogContainer - title={title} - titleColor={color ?? "danger"} - buttons={[ - { - key: "cancel", - type: "normal", - props: { - text: "operationDialog.cancel", - color: "secondary", - outline: true, - onClick: onClose, - }, - }, - { - key: "confirm", - type: "normal", - props: { - text: "operationDialog.confirm", - color: "danger", - onClick: () => { - onConfirm(); - onClose(); - }, - }, - }, - ]} - > - <div className={`cru-${bodyColor ?? "primary"}`}>{c(body)}</div> - </DialogContainer> - </Dialog> - ); -} |