CreatViewIO header menu and EditViewIO modal
This commit is contained in:
@@ -5,28 +5,29 @@ import { OPACITY_ON_LOAD } from "../Layout/animations";
|
||||
import { ArrowBackIcon } from "@chakra-ui/icons";
|
||||
|
||||
const FormInputMain = ({
|
||||
register,
|
||||
groupedFields,
|
||||
control,
|
||||
errors,
|
||||
onSubmit,
|
||||
children,
|
||||
onCancle,
|
||||
onCancle,
|
||||
submitTitle,
|
||||
p,
|
||||
w
|
||||
w,
|
||||
}) => {
|
||||
return (
|
||||
<form onSubmit={onSubmit}>
|
||||
{Object.entries(groupedFields).map(([section, fields], index) => (
|
||||
<Box key={section} mt={4} >
|
||||
<Heading as="h6" size="xs" mx={5} fontWeight={'500'}>
|
||||
<Box key={section} mt={4}>
|
||||
<Heading as="h6" size="xs" mx={5} fontWeight={"500"}>
|
||||
{/* <ArrowBackIcon fontSize={'lg'} /> */}
|
||||
{section}
|
||||
</Heading>
|
||||
<Box display={"flex"} gap={0}>
|
||||
<Box
|
||||
width={"100%"}
|
||||
p={p?p:5}
|
||||
p={p ? p : 5}
|
||||
display={"flex"}
|
||||
flexWrap={"wrap"}
|
||||
gap={4}
|
||||
@@ -49,7 +50,7 @@ const FormInputMain = ({
|
||||
options,
|
||||
helperText,
|
||||
multiple,
|
||||
width
|
||||
width,
|
||||
},
|
||||
key
|
||||
) => (
|
||||
@@ -83,22 +84,24 @@ const FormInputMain = ({
|
||||
))}
|
||||
|
||||
{children}
|
||||
|
||||
<Box display={'flex'} justifyContent={'end'} mb={5}>
|
||||
<Box display={"flex"} justifyContent={"end"} p={2} w={'49%'} gap={4}>
|
||||
{onCancle && <Button
|
||||
size={"sm"}
|
||||
width={w?w:"44.5%"}
|
||||
rounded={"sm"}
|
||||
type="submit"
|
||||
colorScheme='gray'
|
||||
onClick={onCancle}
|
||||
>
|
||||
Cancel
|
||||
</Button>}
|
||||
|
||||
<Box display={"flex"} justifyContent={"end"} mb={5}>
|
||||
<Box display={"flex"} justifyContent={"end"} p={2} w={"49%"} gap={4}>
|
||||
{onCancle && (
|
||||
<Button
|
||||
size={"sm"}
|
||||
width={w ? w : "44.5%"}
|
||||
rounded={"sm"}
|
||||
type="submit"
|
||||
colorScheme="gray"
|
||||
onClick={onCancle}
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
size={"sm"}
|
||||
width={w?w:"44.5%"}
|
||||
width={w ? w : "44.5%"}
|
||||
rounded={"sm"}
|
||||
type="submit"
|
||||
colorScheme="green"
|
||||
|
||||
Reference in New Issue
Block a user