Created
July 17, 2021 17:06
-
-
Save DZuz14/6b4068133c23557b626a90a62911a4ad to your computer and use it in GitHub Desktop.
coh374
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 { Form, FormGroup } from "react-bootstrap"; | |
import formData from "./formData"; | |
import useForm from "./useForm"; | |
const SomeComponent = () => { | |
const { fields } = useForm(formData); | |
return ( | |
<div css={CSS}> | |
<Form> | |
{fields.map((field) => ( | |
<FormGroup key={field.name}> | |
<Form.Label>{field.name}</Form.Label> | |
<Form.Control | |
type={field.type} | |
name={field.name} | |
value={field.value} | |
onChange={() => {}} | |
placeholder={field.placeholder} | |
/> | |
</FormGroup> | |
))} | |
</Form> | |
</div> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment