Created
February 9, 2021 06:06
-
-
Save ManiruzzamanAkash/5dbee57834ca701744110069ef38cfe9 to your computer and use it in GitHub Desktop.
Task2Form For Simple Modal React
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, { useState } from "react"; | |
import SimpleModal from "./SimpleModal"; | |
const Task2Form = () => { | |
const [task1Show, setTask1Show] = useState(false); | |
return ( | |
<> | |
<button | |
className="btn btn-sm btn-info" | |
onClick={() => setTask1Show(true)} | |
> | |
Task 2 Modal | |
</button> | |
<SimpleModal | |
show={task1Show} | |
handleClose={() => setTask1Show(false)} | |
handleShow={() => setTask1Show(true)} | |
modalTitle="Create Another Task" | |
> | |
<form> | |
<input | |
type="text" | |
className="form-control" | |
placeholder="Enter Title" | |
/> | |
<input | |
type="submit" | |
className="mt-2 btn btn-success" | |
value="Submit" | |
/> | |
</form> | |
</SimpleModal> | |
</> | |
); | |
}; | |
export default Task2Form; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment