// react import React from "react"; // react-hook-form import { Control, Controller } from "react-hook-form"; // headless ui import { Listbox, Transition } from "@headlessui/react"; // icons import { ChevronDownIcon, ChartBarIcon } from "@heroicons/react/24/outline"; // types import { IIssue } from "types"; // constants import { classNames } from "constants/common"; import { PRIORITIES } from "constants/"; type Props = { control: Control; submitChanges: (formData: Partial) => void; }; const SelectPriority: React.FC = ({ control, submitChanges }) => { return (

Priority

( { submitChanges({ priority: value }); }} className="flex-shrink-0" > {({ open }) => (
{value}
{PRIORITIES.map((option) => ( `${ active || selected ? "text-white bg-theme" : "text-gray-900" } flex items-center gap-2 cursor-pointer select-none relative p-2 rounded-md truncate capitalize` } value={option} > {option} ))}
)}
)} />
); }; export default SelectPriority;