Skip to content

Instantly share code, notes, and snippets.

@Ateevduggal
Last active June 11, 2022 04:17
Show Gist options
  • Save Ateevduggal/27daa27126a8be951a34bf1528a61440 to your computer and use it in GitHub Desktop.
Save Ateevduggal/27daa27126a8be951a34bf1528a61440 to your computer and use it in GitHub Desktop.
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