import { MoreVerticalIcon } from "~/components/ui/icons/vendor"; import { Button } from "../button"; import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from "../dropdown-menu"; import { Link } from "react-router"; import { Fragment } from "react/jsx-runtime"; import { cn } from "~/lib/utils"; import { useTranslation } from "react-i18next"; interface Props { title?: string; items: { name: "separator" | React.ReactNode | (string & {}); href?: string; target?: string; onClick?: () => void; disabled?: boolean; className?: string; hidden?: boolean; }[]; size?: "xs" | "sm" | "lg"; children?: React.ReactNode; className?: string; classMenuContent?: string; variant?: "default" | "ghost" | "outline"; ariaLabel?: string; } export default function DropdownDots({ title, items, size = "sm", children, className, classMenuContent, variant = "ghost", ariaLabel }: Props) { const { t } = useTranslation(); return ( { e.stopPropagation(); }} > {title && ( {title} )} {items .filter((item) => !item.hidden) .map((item, idx) => ( {item.name === "separator" ? ( ) : ( {item.href && !item.disabled ? ( { e.stopPropagation(); }} target={item.target} > {item.name} ) : ( )} )} ))} {/* deleteItem(item.id)}> Delete */} ); }