import React from "react"; // react hook form import { Controller } from "react-hook-form"; // headless ui import { Listbox, Transition } from "@headlessui/react"; // icons import { CheckIcon } from "@heroicons/react/20/solid"; // constants import { PRIORITIES } from "constants/"; // types import type { IIssue } from "types"; import type { Control } from "react-hook-form"; import { ChartBarIcon } from "@heroicons/react/24/outline"; type Props = { control: Control; }; const SelectPriority: React.FC = ({ control }) => { return ( ( {({ open }) => ( <>
{value && value !== "" ? value : "Priority"}
{PRIORITIES.map((priority) => ( `${ active ? "bg-indigo-50" : "" } text-gray-900 cursor-pointer select-none p-2` } value={priority} > {({ selected, active }) => ( <> {priority} )} ))}
)}
)} >
); }; export default SelectPriority;