-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathModal.js
More file actions
34 lines (31 loc) · 1.17 KB
/
Modal.js
File metadata and controls
34 lines (31 loc) · 1.17 KB
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
26
27
28
29
30
31
32
33
34
import React from 'react';
import './modal.css';
import WarningRoundedIcon from '@mui/icons-material/WarningRounded';
function Modal({ handleClose, handleConfirm , show, children }) {
const showHideClassName = show ? "modal display-block" : "modal display-none";
return (
<><div className={showHideClassName}>
<section className="modal-main">
{children}
<div className="titleCloseBtn">
<div className='warning-container'>
<WarningRoundedIcon className='war-icon'></WarningRoundedIcon>
<h1 className='heading-popup'>Are you sure?</h1>
</div>
<p className='subheading-popup'>this action cannot be undo</p>
</div>
<div className="btn-container">
<button className='btn btn-1' type='button'
onClick={handleConfirm}>
Yes
</button>
<button className='btn btn-2' type='button'
onClick={handleClose}>
No
</button>
</div>
</section>
</div></>
);
}
export default Modal