aboutsummaryrefslogtreecommitdiff
path: root/client/src/components/Modal
diff options
context:
space:
mode:
authorrohan09-raj <[email protected]>2024-05-14 21:45:00 +0530
committerBlaster4385 <[email protected]>2024-05-15 11:10:02 +0530
commitf6d70cf9ab622a58739d2dc939b8b1043b4791c5 (patch)
treef1aaa865ab831323d36bae8421575bdad81f33a8 /client/src/components/Modal
parent1b61dfbed74b8f15afef5f3f05551721b301d9af (diff)
feat: added end-to-end encryption
Diffstat (limited to 'client/src/components/Modal')
-rw-r--r--client/src/components/Modal/Modal.jsx25
-rw-r--r--client/src/components/Modal/Modal.module.css61
2 files changed, 86 insertions, 0 deletions
diff --git a/client/src/components/Modal/Modal.jsx b/client/src/components/Modal/Modal.jsx
new file mode 100644
index 0000000..54c816e
--- /dev/null
+++ b/client/src/components/Modal/Modal.jsx
@@ -0,0 +1,25 @@
+import React from "react";
+import styles from "./Modal.module.css";
+
+const Modal = ({ openModal, setOpenModal, onSuccessClick, onCancelClick }) => {
+ return (
+ <div className={`${styles.background} ${openModal && styles.active}`}>
+ <div className={styles.container}>
+ <button
+ className={styles.container__close}
+ onClick={() => setOpenModal(false)}
+ >
+ <img src="assets/icons/ic_close.png" className={styles.close__img} />
+ </button>
+ <p className={styles.container__title}>Encrypt content?</p>
+ <div className={styles.container__actions}>
+ <button onClick={onSuccessClick}>Yes</button>
+ <button onClick={onCancelClick}>No</button>
+ </div>
+ </div>
+ </div>
+ );
+};
+
+export default Modal;
+
diff --git a/client/src/components/Modal/Modal.module.css b/client/src/components/Modal/Modal.module.css
new file mode 100644
index 0000000..9d79c62
--- /dev/null
+++ b/client/src/components/Modal/Modal.module.css
@@ -0,0 +1,61 @@
+.background {
+ display: none;
+ position: absolute;
+ top: 0;
+ left: 0;
+ height: 100%;
+ width: 100%;
+ background-color: #00000062;
+ z-index: 10;
+}
+
+.active {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.container {
+ top: 0;
+ left: 0;
+ background-color: var(--color-dark);
+ padding: 40px;
+ width: 300px;
+ border-radius: 10px;
+ z-index: 11;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+}
+
+.container__close {
+ cursor: pointer;
+ background: none;
+ border: none;
+ margin-left: auto;
+}
+
+.close__img {
+ width: 20px;
+}
+
+.container__actions {
+ margin-top: 20px;
+ display: flex;
+ width: 100%;
+ justify-content: space-around;
+}
+
+.container__actions button {
+ padding: 10px 20px;
+ cursor: pointer;
+ width: 12rem;
+ text-align: center;
+ background-color: var(--color-yellow);
+ color: var(--color-dark);
+ border-radius: 10px;
+ font-size: 1rem;
+ margin: 0 10px;
+}
+