Refactor code

This commit is contained in:
RaktimaNXG
2023-12-08 17:11:01 +05:30
parent d224a44e54
commit e51feaa1fe
8 changed files with 243 additions and 171 deletions
@@ -0,0 +1,36 @@
import React from "react";
import Modal from "react-bootstrap/Modal";
import ModalHeader from "react-bootstrap/esm/ModalHeader";
function AlertComponent({ isShow, alertMessage, setIsAlert }) {
return (
<Modal show={isShow}>
<ModalHeader className="bg-danger" style={{ color: "white" }}>
<span>Alert</span>
</ModalHeader>
<Modal.Body>
<span>{alertMessage}</span>
</Modal.Body>
<Modal.Footer>
<button
onClick={() => {
setIsAlert({
isShow: false,
alertMessage: ""
});
}}
style={{
color: "black"
}}
type="button"
className="finishBtn"
>
Ok
</button>
</Modal.Footer>
</Modal>
);
}
export default AlertComponent;