Merge branch 'feat/inda-383-daily-stat' into 'main'
[ProtonMail-WebClient.git] / applications / drive / src / app / components / TransferManager / Buttons.tsx
blob41c818021582ad882ab26e3f5afbba8efaaae343
1 import { Button } from '@proton/atoms';
2 import { Icon, Tooltip } from '@proton/components';
3 import clsx from '@proton/utils/clsx';
5 import type { TransfersManagerButtonsProps } from './interfaces';
7 const Buttons = ({ className, buttons, id, children }: TransfersManagerButtonsProps) => {
8     const elClassName = clsx(['flex flex-nowrap justify-end', className]);
10     return (
11         <div className={elClassName} id={id}>
12             {children}
13             {buttons.map(({ disabled, onClick, title, testId, iconName }) => (
14                 <Tooltip title={title} key={title}>
15                     <Button
16                         icon
17                         type="button"
18                         disabled={disabled}
19                         onClick={onClick}
20                         className="transfers-manager-list-item-controls-button rtl:mirror"
21                         data-testid={testId ? testId : undefined}
22                     >
23                         <Icon size={3} name={iconName} alt={title} />
24                     </Button>
25                 </Tooltip>
26             ))}
27         </div>
28     );
31 export default Buttons;