import React from "react"; // headless ui import { Listbox, Transition } from "@headlessui/react"; // icons import { getPriorityIcon } from "components/icons/priority-icon"; // constants import { PRIORITIES } from "constants/project"; import { CheckIcon } from "@heroicons/react/24/outline"; type Props = { value: string | null; onChange: (value: string) => void; }; export const IssuePrioritySelect: React.FC = ({ value, onChange }) => ( {({ open }) => ( <> `flex items-center text-xs cursor-pointer border rounded-md shadow-sm duration-300 ${ open ? "outline-none border-[#3F76FF] bg-[rgba(63,118,255,0.05)] ring-1 ring-[#3F76FF] " : "hover:bg-[rgba(63,118,255,0.05)] focus:bg-[rgba(63,118,255,0.05)]" }` } > {getPriorityIcon(value, `${value ? "text-xs" : "text-xs text-[#858E96]"}`)} {value ?? "Priority"}
{PRIORITIES.map((priority) => ( `${ active ? "bg-[#E9ECEF]" : "" } group flex min-w-[14rem] cursor-pointer select-none items-center gap-2 truncate rounded px-1 py-1.5 text-[#495057]` } value={priority} > {({ selected, active }) => (
{getPriorityIcon(priority)} {priority ?? "None"}
)}
))}
)}
);