Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Use of Demo Modal in APp
import React, { useState } from "react";
import SimpleModal from "./Components/SimpleModal";
import Task1Form from "./Components/Task1Form";
import Task2Form from "./Components/Task2Form";
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>
<Task1Form />
<br/>
<br/>
<Task2Form />
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment