X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/bc58988320c7c52cad07891d5ed941560fca083f..0eaad7ee985d2534e030e2d2839392435c33bba2:/src/components/collection-panel-files/collection-panel-files.tsx diff --git a/src/components/collection-panel-files/collection-panel-files.tsx b/src/components/collection-panel-files/collection-panel-files.tsx index 27354db18a..9a534e4bcb 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: '50px' + 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 - - - ); - + + + );