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 ? "text-white bg-theme" : "text-gray-900" } cursor-pointer select-none relative p-2 rounded-md` } value={priority} > {({ selected, active }) => ( <> {priority} )} ))}
)}
)} >
); }; export default SelectPriority;