X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/95cac76b24cf817cfc1d825599087833e9ba7742..ceca6c57cc7d0357ab74abd47b80633a885ec575:/src/components/collection-panel-files/collection-panel-files.tsx?ds=sidebyside diff --git a/src/components/collection-panel-files/collection-panel-files.tsx b/src/components/collection-panel-files/collection-panel-files.tsx index cdca7e8e..c3cb4acc 100644 --- a/src/components/collection-panel-files/collection-panel-files.tsx +++ b/src/components/collection-panel-files/collection-panel-files.tsx @@ -6,49 +6,76 @@ import * as React from 'react'; import { TreeItem, TreeItemStatus } from '../tree/tree'; import { FileTreeData } from '../file-tree/file-tree-data'; import { FileTree } from '../file-tree/file-tree'; -import { IconButton, Grid, Typography, StyleRulesCallback, withStyles, WithStyles, CardHeader, CardContent, Card } from '@material-ui/core'; +import { IconButton, Grid, Typography, StyleRulesCallback, withStyles, WithStyles, CardHeader, Card, Button, Tooltip } from '@material-ui/core'; import { CustomizeTableIcon } from '../icon/icon'; +import { DownloadIcon } from '~/components/icon/icon'; export interface CollectionPanelFilesProps { items: Array>; + onUploadDataClick: () => void; onItemMenuOpen: (event: React.MouseEvent, item: TreeItem) => void; onOptionsMenuOpen: (event: React.MouseEvent) => void; onSelectionToggle: (event: React.MouseEvent, item: TreeItem) => void; onCollapseToggle: (id: string, status: TreeItemStatus) => void; } -type CssRules = 'root' | 'nameHeader' | 'fileSizeHeader'; +type CssRules = 'root' | 'cardSubheader' | 'nameHeader' | 'fileSizeHeader' | 'uploadIcon' | 'button'; const styles: StyleRulesCallback = theme => ({ root: { paddingBottom: theme.spacing.unit }, + cardSubheader: { + paddingTop: 0, + paddingBottom: 0 + }, nameHeader: { marginLeft: '75px' }, fileSizeHeader: { marginRight: '65px' + }, + uploadIcon: { + transform: 'rotate(180deg)' + }, + button: { + marginRight: -theme.spacing.unit, + marginTop: '0px' } }); -export const CollectionPanelFiles = withStyles(styles)( - ({ onItemMenuOpen, onOptionsMenuOpen, classes, ...treeProps }: CollectionPanelFilesProps & WithStyles) => - - - - - } /> - - - Name +export const CollectionPanelFiles = + withStyles(styles)( + ({ onItemMenuOpen, onOptionsMenuOpen, onUploadDataClick, classes, ...treeProps }: CollectionPanelFilesProps & WithStyles) => + + + + Upload data + + } /> + + + + + + } /> + + + Name - - File size + + File size - - - ); - + + + );