import { Box, Button, Divider, Heading } from "@chakra-ui/react"; import React from "react"; import FormField from "./FormField"; import { OPACITY_ON_LOAD } from "../Layout/animations"; const FormInputMain = ({ groupedFields, control, errors, onSubmit, children, }) => { return (
{Object.entries(groupedFields).map(([section, fields], index) => ( {section} {fields.map( ( { label, name, id, arabic, type, isRequired, selectedImageData, setSelectedImageData, imageData, handleImageChange, removeImage, placeHolder, options, helperText, multiple, }, key ) => ( ) )} {index < Object.entries(groupedFields).length - 1 && } ))} {children}
); }; export default FormInputMain;