-
-
Save Ateevduggal/27daa27126a8be951a34bf1528a61440 to your computer and use it in GitHub Desktop.
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 from "react"; | |
const Form = ({ tableData, setTableData }) => { | |
return ( | |
<> | |
<div className="container-fluid"> | |
<div className="row py-3"> | |
<form className="d-flex flex-wrap justify-content-center form"> | |
<input | |
type="text" | |
name="fullName" | |
required | |
placeholder="Enter full name..." | |
onChange={Change} | |
value={newData.fullName} | |
className="form-control-sm fs-4 col-3 mx-5" | |
/> | |
<input | |
type="text" | |
name="userName" | |
required | |
placeholder="Enter user name..." | |
onChange={Change} | |
value={newData.userName} | |
className="form-control-sm col-3 mx-5 fs-4" | |
/> | |
<input | |
type="text" | |
name="phoneNumber" | |
required | |
placeholder="Enter a phone number..." | |
onChange={Change} | |
value={newData.phoneNumber} | |
className="form-control-sm col-3 mx-5 fs-4" | |
/> | |
<input | |
type="text" | |
name="website" | |
required | |
placeholder="Enter website..." | |
onChange={Change} | |
value={newData.website} | |
className="form-control-sm col-3 mx-5 fs-4 mt-4" | |
/> | |
<input | |
type="text" | |
name="companyName" | |
required | |
placeholder="Enter company name..." | |
onChange={Change} | |
value={newData.companyName} | |
className="form-control-sm col-3 mx-5 fs-4 mt-4" | |
/> | |
<input | |
type="email" | |
name="email" | |
required | |
placeholder="Enter an email..." | |
onChange={Change} | |
value={newData.email} | |
className="form-control-sm col-3 mx-5 fs-4 mt-4" | |
/> | |
<div className="w-100"></div> | |
<button | |
className="btn-primary px-2 mx-3 fs-3 col-2 mt-4" | |
onClick={Add} | |
type="submit" | |
> | |
Add | |
</button> | |
</form> | |
</div> | |
</div> | |
</> | |
); | |
}; | |
export default Form; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment