17782: Fixes almost all tests (4 left) mostly by fixing namespace-type imports.
[arvados-workbench2.git] / src / views-components / context-menu / actions / file-viewer-action.tsx
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import React from "react";
6 import { ListItemIcon, ListItemText, ListItem } from "@material-ui/core";
7 import { OpenIcon } from "components/icon/icon";
8
9 export const FileViewerAction = (props: any) => {
10     return props.href
11         ? <a
12             style={{ textDecoration: 'none' }}
13             href={props.href}
14             target="_blank"
15             onClick={props.onClick}>
16             <ListItem button>
17                 <ListItemIcon>
18                     <OpenIcon />
19                 </ListItemIcon>
20                 <ListItemText>
21                     Open in new tab
22                     </ListItemText>
23             </ListItem>
24         </a>
25         : null;
26 };