// react-hook-form import { Controller, useForm } from "react-hook-form"; // headless ui import { Disclosure } from "@headlessui/react"; // components import { FileFormatsDropdown } from "components/custom-attributes"; // ui import { ToggleSwitch } from "components/ui"; import { Input } from "../input"; // icons import { ChevronDown } from "lucide-react"; // types import { ICustomAttribute } from "types"; // constants import { CUSTOM_ATTRIBUTES_LIST } from "constants/custom-attributes"; type Props = {}; const defaultFormValues: Partial = { display_name: "", extra_settings: { file_formats: [], }, is_multi: false, is_required: false, }; export const FileAttributeForm: React.FC = () => { const { control } = useForm({ defaultValues: defaultFormValues }); const typeMetaData = CUSTOM_ATTRIBUTES_LIST.files; return ( {({ open }) => ( <>
{typeMetaData.label}
( )} /> ( )} />
( )} /> Mandatory field
)}
); };