aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/app/views/timeline-common/TimelinePostDeleteConfirmDialog.tsx
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-01-13 14:13:02 +0800
committercrupest <crupest@outlook.com>2021-01-13 14:13:02 +0800
commit12e12dff4fb83e125a47b62a2c4be335363de089 (patch)
treeb41d31af16021965f000f7000e0d73710371ea70 /FrontEnd/src/app/views/timeline-common/TimelinePostDeleteConfirmDialog.tsx
parentcf14e89a51919e053ba89b0c78ee71940b18e40a (diff)
downloadtimeline-12e12dff4fb83e125a47b62a2c4be335363de089.tar.gz
timeline-12e12dff4fb83e125a47b62a2c4be335363de089.tar.bz2
timeline-12e12dff4fb83e125a47b62a2c4be335363de089.zip
...
Diffstat (limited to 'FrontEnd/src/app/views/timeline-common/TimelinePostDeleteConfirmDialog.tsx')
-rw-r--r--FrontEnd/src/app/views/timeline-common/TimelinePostDeleteConfirmDialog.tsx37
1 files changed, 37 insertions, 0 deletions
diff --git a/FrontEnd/src/app/views/timeline-common/TimelinePostDeleteConfirmDialog.tsx b/FrontEnd/src/app/views/timeline-common/TimelinePostDeleteConfirmDialog.tsx
new file mode 100644
index 00000000..b2c7a470
--- /dev/null
+++ b/FrontEnd/src/app/views/timeline-common/TimelinePostDeleteConfirmDialog.tsx
@@ -0,0 +1,37 @@
+import React from "react";
+import { Modal, Button } from "react-bootstrap";
+import { useTranslation } from "react-i18next";
+
+const TimelinePostDeleteConfirmDialog: React.FC<{
+ onClose: () => void;
+ onConfirm: () => void;
+}> = ({ onClose, onConfirm }) => {
+ const { t } = useTranslation();
+
+ return (
+ <Modal onHide={onClose} show centered>
+ <Modal.Header>
+ <Modal.Title className="text-danger">
+ {t("timeline.post.deleteDialog.title")}
+ </Modal.Title>
+ </Modal.Header>
+ <Modal.Body>{t("timeline.post.deleteDialog.prompt")}</Modal.Body>
+ <Modal.Footer>
+ <Button variant="secondary" onClick={onClose}>
+ {t("operationDialog.cancel")}
+ </Button>
+ <Button
+ variant="danger"
+ onClick={() => {
+ onConfirm();
+ onClose();
+ }}
+ >
+ {t("operationDialog.confirm")}
+ </Button>
+ </Modal.Footer>
+ </Modal>
+ );
+};
+
+export default TimelinePostDeleteConfirmDialog;