aboutsummaryrefslogtreecommitdiff
path: root/client/src/components/Modal/Modal.jsx
blob: 54c816e739a86aeb9d95b7cbe45f070840b9898f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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;