Use source loader for email sprite icons
[ProtonMail-WebClient.git] / packages / drive-store / components / revisions / ContextMenuButtons / RevisionDeleteButton.tsx
blob326dc88de9863be0f4d0e83c556c29a899e0c77e
1 import { c } from 'ttag';
3 import type { DriveFileRevision } from '../../../store';
4 import { ContextMenuButton } from '../../sections/ContextMenu';
5 import type { RevisionsProviderState } from '../RevisionsProvider';
7 interface Props {
8     revision: DriveFileRevision;
9     deleteRevision: RevisionsProviderState['deleteRevision'];
10     close: () => void;
13 const RevisionDeleteButton = ({ revision, deleteRevision, close }: Props) => {
14     return (
15         <ContextMenuButton
16             name={c('Action').t`Delete version`}
17             icon="trash-cross"
18             testId="context-menu-revision-delete"
19             action={() => deleteRevision(new AbortController().signal, revision)}
20             close={close}
21         />
22     );
25 export default RevisionDeleteButton;