Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Demo Use of Simple Modal
import React, { useState } from "react";
import SimpleModal from "./Components/SimpleModal";
export default function App() {
const [show, setShow] = useState(false);
return (
<div className="App">
<h2>Modal Demo</h2>
<button className="btn btn-info btn-sm" onClick={() => setShow(true)}>Open Modal 1</button>
<hr />
<SimpleModal
show={show}
handleClose={() => setShow(false)}
handleShow={() => setShow(true)}
modalTitle="Modal Demo"
>
Simple Test Modal
</SimpleModal>
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment