Merge branch 'feat/inda-383-daily-stat' into 'main'
[ProtonMail-WebClient.git] / applications / drive / src / app / components / TransferManager / DownloadLogsButton.tsx
blob8b66be1e7970735239c84102ec559df2336d5dd4
1 import { c } from 'ttag';
3 import { Dropdown, DropdownButton, DropdownMenu, DropdownMenuButton, Icon, usePopperAnchor } from '@proton/components';
5 export default function DownloadLogsButton({ onClick }: { onClick: () => void }) {
6     const { anchorRef, isOpen, toggle, close } = usePopperAnchor<HTMLButtonElement>();
8     return (
9         <>
10             <DropdownButton
11                 ref={anchorRef}
12                 isOpen={isOpen}
13                 onClick={toggle}
14                 icon
15                 className="transfers-manager-list-item-controls-button"
16             >
17                 <Icon size={3} name="wrench" alt={'More'} />
18             </DropdownButton>
19             <Dropdown isOpen={isOpen} anchorRef={anchorRef} onClose={close}>
20                 <DropdownMenu>
21                     <DropdownMenuButton className="text-left" onClick={onClick}>
22                         {c('Action').t`Download logs`}
23                     </DropdownMenuButton>
24                 </DropdownMenu>
25             </Dropdown>
26         </>
27     );