mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-26 04:54:36 +00:00
changes
This commit is contained in:
@@ -9,7 +9,6 @@ import {useCommonStyles} from "../../../helpers/commonStyle";
|
||||
|
||||
interface ConfirmationModalProps {
|
||||
title?: string;
|
||||
|
||||
isOpen: boolean;
|
||||
onClose: () => void;
|
||||
onConfirm: () => void;
|
||||
@@ -22,16 +21,21 @@ interface ConfirmationModalProps {
|
||||
titleColor?: string;
|
||||
img?: ReactElement;
|
||||
isLoading?: boolean;
|
||||
className?: any;
|
||||
}
|
||||
|
||||
const ConfirmationModal: React.FC<ConfirmationModalProps> = observer(({title, isOpen, onClose, onConfirm, confirmButtonText, closeButtonText, subContent, confirmDisabled = false, isWide, confirmButtonColor, titleColor, img, isLoading,children}) => {
|
||||
const ConfirmationModal: React.FC<ConfirmationModalProps> = observer(({title, isOpen, onClose, onConfirm, confirmButtonText,
|
||||
closeButtonText, subContent, confirmDisabled = false, isWide,
|
||||
confirmButtonColor, titleColor, img, isLoading,children,
|
||||
className}) => {
|
||||
const classes = useCommonStyles();
|
||||
const confirmStyle = {width: 100, marginLeft: 20}
|
||||
return (
|
||||
<CustomModal open={isOpen} onClose={onClose} disableBackdropClick={true} isWide={isWide}>
|
||||
<CustomModal open={isOpen} onClose={onClose} disableBackdropClick={true} isWide={isWide} className={className}>
|
||||
<div className="confirmationHeader">
|
||||
<div className="confirmationTitle" style={titleColor ? {color: titleColor} : {}}>{title ?? "CONFIRMATION"}</div>
|
||||
<img src={iconClose} onClick={onClose} alt="close"/>
|
||||
|
||||
</div>
|
||||
<div className="confirmationText" style={img ? {display: "flex", alignItems: "center"} : {}}>
|
||||
{img && <div style={{paddingRight: 20}}>
|
||||
|
@@ -43,15 +43,21 @@ const CustomModal: React.FunctionComponent<CustomModalProps> = ({ open = false,
|
||||
onClose();
|
||||
}
|
||||
|
||||
return <Modal disableEnforceFocus open={open} onClose={(event, reason) => onModalClose(reason)} className={`${classes.modal} ${className ? className : ''}`}>
|
||||
<div className={`${classes.modalContents} ${globals}`} >
|
||||
<Fade in={open}>
|
||||
<Box>
|
||||
{children}
|
||||
</Box>
|
||||
</Fade>
|
||||
</div>
|
||||
</Modal>
|
||||
return <Modal disableEnforceFocus open={open} onClose={(event, reason) => onModalClose(reason)}
|
||||
className={`${classes.modal}`}
|
||||
closeAfterTransition
|
||||
BackdropComponent={Backdrop}
|
||||
BackdropProps={{
|
||||
timeout: 500,
|
||||
}}>
|
||||
<div className={`${classes.modalContents} ${globals} ${className ? className : ''}`} >
|
||||
<Fade in={open}>
|
||||
<Box>
|
||||
{children}
|
||||
</Box>
|
||||
</Fade>
|
||||
</div>
|
||||
</Modal>
|
||||
}
|
||||
|
||||
export default CustomModal;
|
Reference in New Issue
Block a user