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: (props: any) => void; children: React.ReactNode; label: string | JSX.Element; textAlignment?: "left" | "center" | "right"; width?: "auto" | string; }; const CustomSelect = ({ children, label, textAlignment, value, onChange, width = "auto", }: CustomSelectProps) => { return (
{label}
{children}
); }; type OptionProps = { children: string | JSX.Element; value: string; className?: string; }; const Option: React.FC = ({ children, value, className }) => { return ( `${ active || selected ? "bg-indigo-50" : "" } flex items-center gap-2 text-gray-900 cursor-pointer select-none relative p-2 truncate ${className}` } > {children} ); }; CustomSelect.Option = Option; export default CustomSelect;