import { Box, Check, ChevronDown } from 'lucide-react' import { useState } from 'react' import { Button, CommandEmpty_Shadcn_, CommandGroup_Shadcn_, CommandInput_Shadcn_, CommandItem_Shadcn_, CommandList_Shadcn_, Command_Shadcn_, PopoverContent_Shadcn_, PopoverTrigger_Shadcn_, Popover_Shadcn_, cn, } from 'ui' import { ConnectionType } from './Connect.constants' import { ConnectionIcon } from './ConnectionIcon' interface ConnectDropdownProps { state: string updateState: (state: string) => void label: string items: ConnectionType[] iconFolder?: string supportsDarkMode?: boolean } export const ConnectDropdown = ({ state, updateState, label, items, iconFolder, supportsDarkMode, }: ConnectDropdownProps) => { const [open, setOpen] = useState(false) function onSelectLib(key: string) { updateState(key) setOpen(false) } const selectedItem = items.find((item) => item.key === state) return (
{label}
No results found. {items.map((item) => ( { onSelectLib(item.key) setOpen(false) }} className="flex gap-2 items-center" > {item.icon ? ( ) : ( )} {item.label} ))}
) }