import React from "react"; // headless ui import { Listbox, Transition } from "@headlessui/react"; // icons import { ChevronDownIcon } from "@heroicons/react/20/solid"; type CustomSelectProps = { value: any; onChange: any; children: React.ReactNode; label: string | JSX.Element; textAlignment?: "left" | "center" | "right"; maxHeight?: "sm" | "rg" | "md" | "lg" | "none"; width?: "auto" | string; input?: boolean; noChevron?: boolean; buttonClassName?: string; disabled?: boolean; }; const CustomSelect = ({ children, label, textAlignment, value, onChange, maxHeight = "none", width = "auto", input = false, noChevron = false, buttonClassName = "", disabled = false, }: CustomSelectProps) => ( {label} {!noChevron && !disabled && } {children} ); type OptionProps = { children: string | JSX.Element; value: any; className?: string; }; const Option: React.FC = ({ children, value, className }) => ( `${active || selected ? "bg-indigo-50" : ""} ${ selected ? "font-medium" : "" } relative flex cursor-pointer select-none items-center gap-2 truncate p-2 text-gray-900 ${className}` } > {children} ); CustomSelect.Option = Option; export { CustomSelect };