Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Task2Form For Simple Modal React
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