import { Box, Button, Divider, FormLabel, Heading } from "@chakra-ui/react"; import React from "react"; const FormInputView = ({ groupedFields, name, groupedFieldsTwo, errors, onSubmit, children, }) => { return (
{Object?.entries(groupedFields, groupedFieldsTwo).map( ([section, fields], index) => ( {section} {/* */} {fields.map(({ value, label, id, width, btn, arabic, type }, key) => ( {label} {type==="number" ? value+" /-" : value } ))} {/* */} {index < Object.entries(groupedFields, groupedFieldsTwo).length - 1 && ( )} ) )} {children}
); }; export default FormInputView;