diff options
author | crupest <crupest@outlook.com> | 2023-07-11 18:45:25 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2023-07-11 18:45:25 +0800 |
commit | 78f0934815a87573289c8e52af2666ea38c93251 (patch) | |
tree | 2a46597d7fd5ef64e07e557dfba4a62412e96e16 /FrontEnd/src/views/common/dailog/ConfirmDialog.tsx | |
parent | 82d747f694288db25ebd3f2aef146c8382017158 (diff) | |
download | timeline-78f0934815a87573289c8e52af2666ea38c93251.tar.gz timeline-78f0934815a87573289c8e52af2666ea38c93251.tar.bz2 timeline-78f0934815a87573289c8e52af2666ea38c93251.zip |
Fix dialog typo.
Diffstat (limited to 'FrontEnd/src/views/common/dailog/ConfirmDialog.tsx')
-rw-r--r-- | FrontEnd/src/views/common/dailog/ConfirmDialog.tsx | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/FrontEnd/src/views/common/dailog/ConfirmDialog.tsx b/FrontEnd/src/views/common/dailog/ConfirmDialog.tsx deleted file mode 100644 index 8c2cea5a..00000000 --- a/FrontEnd/src/views/common/dailog/ConfirmDialog.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import { convertI18nText, I18nText } from "@/common"; -import * as React from "react"; -import { useTranslation } from "react-i18next"; - -import Button from "../button/Button"; -import Dialog from "./Dialog"; - -const ConfirmDialog: React.FC<{ - open: boolean; - onClose: () => void; - onConfirm: () => void; - title: I18nText; - body: I18nText; -}> = ({ open, onClose, onConfirm, title, body }) => { - const { t } = useTranslation(); - - return ( - <Dialog onClose={onClose} open={open}> - <h3 className="cru-color-danger">{convertI18nText(title, t)}</h3> - <hr /> - <p>{convertI18nText(body, t)}</p> - <hr /> - <div className="cru-dialog-bottom-area"> - <Button - text="operationDialog.cancel" - color="secondary" - outline - onClick={onClose} - /> - <Button - text="operationDialog.confirm" - color="danger" - onClick={() => { - onConfirm(); - onClose(); - }} - /> - </div> - </Dialog> - ); -}; - -export default ConfirmDialog; |