|
|
|
|
|
|
|
|
import React from "react"; |
|
|
import React from "react"; |
|
|
import PropTypes from "prop-types"; |
|
|
import PropTypes from "prop-types"; |
|
|
|
|
|
import x from "../../assets/images/x.png"; |
|
|
import { |
|
|
import { |
|
|
Dialog, |
|
|
Dialog, |
|
|
DialogTitle, |
|
|
DialogTitle, |
|
|
|
|
|
|
|
|
const theme = useTheme(); |
|
|
const theme = useTheme(); |
|
|
const fullScreen = useMediaQuery(theme.breakpoints.down("md")); |
|
|
const fullScreen = useMediaQuery(theme.breakpoints.down("md")); |
|
|
|
|
|
|
|
|
// const { t } = useTranslation(); |
|
|
|
|
|
|
|
|
|
|
|
const handleClose = () => { |
|
|
const handleClose = () => { |
|
|
onClose(); |
|
|
onClose(); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
// useEffect(()=>{ |
|
|
|
|
|
// handleClose(); |
|
|
|
|
|
// },[onConfirm]) |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
<Dialog |
|
|
<Dialog |
|
|
maxWidth={maxWidth} |
|
|
maxWidth={maxWidth} |
|
|
|
|
|
|
|
|
> |
|
|
> |
|
|
<div style={{ padding: "36px" }}> |
|
|
<div style={{ padding: "36px" }}> |
|
|
<DialogTitle style={{ padding: 0 }}> |
|
|
<DialogTitle style={{ padding: 0 }}> |
|
|
<div |
|
|
|
|
|
className="flex-center" |
|
|
|
|
|
style={{ justifyContent: "space-between" }} |
|
|
|
|
|
> |
|
|
|
|
|
<div className="flex-center" style={{ justifyContent: "start" }}> |
|
|
|
|
|
<img |
|
|
|
|
|
style={{ |
|
|
|
|
|
position: "relative", |
|
|
|
|
|
top: -0.25, |
|
|
|
|
|
paddingRight: "10px", |
|
|
|
|
|
}} |
|
|
|
|
|
src={imgSrc} |
|
|
|
|
|
/> |
|
|
|
|
|
<h5>{title}</h5> |
|
|
|
|
|
<div className="vr"></div> |
|
|
|
|
|
<p className="dialog-subtitle">{subtitle}</p> |
|
|
|
|
|
|
|
|
{fullScreen ? ( |
|
|
|
|
|
<> |
|
|
|
|
|
<div className="flex-center" style={{ justifyContent: "start" }}> |
|
|
|
|
|
<img |
|
|
|
|
|
style={{ |
|
|
|
|
|
position: "relative", |
|
|
|
|
|
top: -0.25, |
|
|
|
|
|
paddingRight: "10px", |
|
|
|
|
|
}} |
|
|
|
|
|
src={imgSrc} |
|
|
|
|
|
/> |
|
|
|
|
|
<h5 style={{ textAlign: "start" }}>{title}</h5> |
|
|
|
|
|
<div style={{ justifySelf: "stretch", flex:'1' }}></div> |
|
|
|
|
|
<IconButton |
|
|
|
|
|
onClick={onClose} |
|
|
|
|
|
> |
|
|
|
|
|
<img |
|
|
|
|
|
style={{ |
|
|
|
|
|
position: "relative", |
|
|
|
|
|
top: -0.25, |
|
|
|
|
|
}} |
|
|
|
|
|
src={x} |
|
|
|
|
|
/> |
|
|
|
|
|
</IconButton> |
|
|
|
|
|
</div> |
|
|
|
|
|
<p |
|
|
|
|
|
className="dialog-subtitle" |
|
|
|
|
|
style={{ paddingLeft: "23px", marginTop: "-10px" }} |
|
|
|
|
|
> |
|
|
|
|
|
| {subtitle} |
|
|
|
|
|
</p> |
|
|
|
|
|
</> |
|
|
|
|
|
) : ( |
|
|
|
|
|
<div |
|
|
|
|
|
className="flex-center" |
|
|
|
|
|
style={{ justifyContent: "space-between" }} |
|
|
|
|
|
> |
|
|
|
|
|
<div className="flex-center" style={{ justifyContent: "start" }}> |
|
|
|
|
|
<img |
|
|
|
|
|
style={{ |
|
|
|
|
|
position: "relative", |
|
|
|
|
|
top: -0.25, |
|
|
|
|
|
paddingRight: "10px", |
|
|
|
|
|
}} |
|
|
|
|
|
src={imgSrc} |
|
|
|
|
|
/> |
|
|
|
|
|
<h5>{title}</h5> |
|
|
|
|
|
<div className="vr"></div> |
|
|
|
|
|
<p className="dialog-subtitle">{subtitle}</p> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
)} |
|
|
</DialogTitle> |
|
|
</DialogTitle> |
|
|
<DialogContent> |
|
|
<DialogContent> |
|
|
<div className="modal-content">{content}</div> |
|
|
<div className="modal-content">{content}</div> |
|
|
</DialogContent> |
|
|
</DialogContent> |
|
|
<DialogActions style={{ padding: 0 }}> |
|
|
<DialogActions style={{ padding: 0 }}> |
|
|
|
|
|
{!fullScreen ? ( |
|
|
|
|
|
<IconButton |
|
|
|
|
|
data-testid="editbtn" |
|
|
|
|
|
className={`c-btn--primary-outlined c-btn dialog-btn`} |
|
|
|
|
|
onClick={onClose} |
|
|
|
|
|
> |
|
|
|
|
|
Cancel |
|
|
|
|
|
</IconButton> |
|
|
|
|
|
) : ( |
|
|
|
|
|
"" |
|
|
|
|
|
)} |
|
|
<IconButton |
|
|
<IconButton |
|
|
data-testid="editbtn" |
|
|
data-testid="editbtn" |
|
|
className={`c-btn--primary-outlined c-btn dialog-btn`} |
|
|
|
|
|
onClick={onClose} |
|
|
|
|
|
> |
|
|
|
|
|
Cancel |
|
|
|
|
|
</IconButton> |
|
|
|
|
|
<IconButton |
|
|
|
|
|
data-testid="editbtn" |
|
|
|
|
|
className={`c-btn--primary-outlined c-btn dialog-btn`} |
|
|
|
|
|
|
|
|
className={`c-btn--primary-outlined sm-full c-btn dialog-btn`} |
|
|
onClick={onConfirm} |
|
|
onClick={onConfirm} |
|
|
> |
|
|
> |
|
|
Confirm |
|
|
Confirm |