Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SimpleModal Component
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