Merge branch 'feat/inda-383-daily-stat' into 'main'
[ProtonMail-WebClient.git] / packages / drive-store / components / sections / ContextMenu / buttons / PreviewButton.tsx
blobfbb63c1cd9f46a56ca52ed52cd5cb32a2deb2677
1 import { c } from 'ttag';
3 import useOpenPreview from '../../../useOpenPreview';
4 import ContextMenuButton from '../ContextMenuButton';
6 interface Props {
7     shareId: string;
8     linkId: string;
9     close: () => void;
12 const PreviewButton = ({ shareId, linkId, close }: Props) => {
13     const openPreview = useOpenPreview();
15     return (
16         <ContextMenuButton
17             name={c('Action').t`Preview`}
18             icon="eye"
19             testId="context-menu-preview"
20             action={() => openPreview(shareId, linkId)}
21             close={close}
22         />
23     );
26 export default PreviewButton;