1 import { c } from 'ttag';
3 import { CircleLoader } from '@proton/atoms';
12 } from '@proton/components';
14 import { useDesktopDownloads } from '../../../hooks/drive/useDesktopDownloads';
20 const DesktopDownloadDropdown = ({ className }: Props) => {
21 const { anchorRef, isOpen, toggle, close } = usePopperAnchor<HTMLButtonElement>();
22 const { isLoading, downloads } = useDesktopDownloads();
34 data-testid="toolbar-dropdown-button"
36 {c('Action').t`Download apps`}
43 width: DropdownSizeUnit.Anchor,
48 <CircleLoader className="w-full flex items-center my-2" />
50 downloads.map(({ platform, icon, name, url, startDownload }) => (
52 className="text-left flex items-center"
55 onClick={startDownload}
57 <Icon name={icon} className="color-weak mr-2" />
68 export default DesktopDownloadDropdown;