import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown'; import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent'; import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer'; import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth'; import { useCloseDropdown } from '@/ui/layout/dropdown/hooks/useCloseDropdown'; import { IconDotsVertical, IconDownload, IconPencil, IconTrash, } from 'twenty-ui/display'; import { LightIconButton } from 'twenty-ui/input'; import { MenuItem } from 'twenty-ui/navigation'; type AttachmentDropdownProps = { onDownload: () => void; onDelete: () => void; onRename: () => void; scopeKey: string; }; export const AttachmentDropdown = ({ onDownload, onDelete, onRename, scopeKey, }: AttachmentDropdownProps) => { const dropdownId = `${scopeKey}-settings-field-active-action-dropdown`; const { closeDropdown } = useCloseDropdown(); const handleDownload = () => { onDownload(); closeDropdown(dropdownId); }; const handleDelete = () => { onDelete(); closeDropdown(dropdownId); }; const handleRename = () => { onRename(); closeDropdown(dropdownId); }; return ( } dropdownComponents={ } /> ); };