// react-hook-form import { Controller, useForm } from "react-hook-form"; // headless ui import { Disclosure, Popover, Transition } from "@headlessui/react"; // ui import { CustomSelect, ToggleSwitch } from "components/ui"; import { Input } from "../input"; // icons import { ChevronDown, GripVertical, MoreHorizontal } from "lucide-react"; // types import { ICustomAttribute } from "types"; // constants import { CUSTOM_ATTRIBUTES_LIST } from "constants/custom-attributes"; import { TwitterPicker } from "react-color"; import React from "react"; type Props = {}; const defaultFormValues: Partial = { default_value: "", display_name: "", is_required: false, }; export const SelectOption: React.FC = () => (
{/* */}

🚀 Option 1

); export const SelectAttributeForm: React.FC = () => { const { control } = useForm({ defaultValues: defaultFormValues }); const typeMetaData = CUSTOM_ATTRIBUTES_LIST.select; return ( {({ open }) => ( <>
{typeMetaData.label}
( )} />

Options

{/* TODO: map over options */}
🚀 {({ open, close }) => ( <> ( { onChange(value.hex); close(); }} /> )} /> )}
( )} /> Mandatory field
)}
); };