Created
February 9, 2021 06:03
-
-
Save ManiruzzamanAkash/220f6f40af507770b896fda7554df77e to your computer and use it in GitHub Desktop.
Simple Modal Component with Form
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 Task1Form = () => { | |
const [task1Show, setTask1Show] = useState(false); | |
return ( | |
<> | |
<button | |
className="btn btn-sm btn-info" | |
onClick={() => setTask1Show(true)} | |
> | |
Task 1 Modal | |
</button> | |
<SimpleModal | |
show={task1Show} | |
handleClose={() => setTask1Show(false)} | |
handleShow={() => setTask1Show(true)} | |
modalTitle="Create A 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 Task1Form; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment