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-200 ${ open ? "outline-none border-theme bg-theme/5 ring-1 ring-theme " : "hover:bg-theme/5" }` } > {getPriorityIcon(value, `${value ? "text-xs" : "text-xs text-gray-500"}`)} {value ?? "Priority"}
{PRIORITIES.map((priority) => ( `${ active ? "bg-gray-200" : "" } group flex min-w-[14rem] cursor-pointer select-none items-center gap-2 truncate rounded px-1 py-1.5 text-gray-600` } value={priority} > {({ selected, active }) => (
{getPriorityIcon(priority)} {priority ?? "None"}
)}
))}
)}
);