Skip to content

Instantly share code, notes, and snippets.

@ManiruzzamanAkash
Created February 9, 2021 06:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ManiruzzamanAkash/f576b79376341a011c0734b9011d8038 to your computer and use it in GitHub Desktop.
Save ManiruzzamanAkash/f576b79376341a011c0734b9011d8038 to your computer and use it in GitHub Desktop.
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