Created
February 9, 2021 05:13
-
-
Save ManiruzzamanAkash/a26750f4794ed1e00b79351d7d932125 to your computer and use it in GitHub Desktop.
SimpleModal Component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { Modal } from "react-bootstrap"; | |
const SimpleModal = (props) => { | |
const { show, handleClose, size, modalTitle } = props; | |
return ( | |
<Modal onClose={handleClose} size={size} show={show} onHide={handleClose}> | |
<Modal.Header closeButton> | |
<Modal.Title>{modalTitle}</Modal.Title> | |
<p className="btn-modal-close" onClick={() => handleClose()}> | |
<i className="fa fa-times text-danger"></i> | |
</p> | |
</Modal.Header> | |
<Modal.Body>{props.children}</Modal.Body> | |
</Modal> | |
); | |
}; | |
export default SimpleModal; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment