X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/eb4491eea9ba873845f7a5796d139d19977f8112..7400998048d63d93ac6eb63895cd4a9e4d728591:/src/components/file-tree/file-tree-item.tsx?ds=inline

diff --git a/src/components/file-tree/file-tree-item.tsx b/src/components/file-tree/file-tree-item.tsx
index e2d6b26c..98164ad4 100644
--- a/src/components/file-tree/file-tree-item.tsx
+++ b/src/components/file-tree/file-tree-item.tsx
@@ -5,12 +5,12 @@
 import * as React from "react";
 import { TreeItem } from "../tree/tree";
 import { ProjectIcon, MoreOptionsIcon, DefaultIcon, CollectionIcon } from "../icon/icon";
-import { Typography, IconButton, StyleRulesCallback, withStyles, WithStyles } from "@material-ui/core";
+import { Typography, IconButton, StyleRulesCallback, withStyles, WithStyles, Tooltip } from '@material-ui/core';
 import { formatFileSize } from "~/common/formatters";
 import { ListItemTextIcon } from "../list-item-text-icon/list-item-text-icon";
 import { FileTreeData } from "./file-tree-data";
 
-type CssRules = "root" | "spacer" | "sizeInfo" | "button";
+type CssRules = "root" | "spacer" | "sizeInfo" | "button" | "moreOptions";
 
 const fileTreeItemStyle: StyleRulesCallback<CssRules> = theme => ({
     root: {
@@ -27,7 +27,10 @@ const fileTreeItemStyle: StyleRulesCallback<CssRules> = theme => ({
     button: {
         width: theme.spacing.unit * 3,
         height: theme.spacing.unit * 3,
-        marginRight: theme.spacing.unit
+        marginRight: theme.spacing.unit,
+    },
+    moreOptions: {
+        position: 'absolute'
     }
 });
 
@@ -47,11 +50,13 @@ export const FileTreeItem = withStyles(fileTreeItemStyle)(
                 <Typography
                     className={classes.sizeInfo}
                     variant="caption">{formatFileSize(item.data.size)}</Typography>
-                <IconButton
-                    className={classes.button}
-                    onClick={this.handleClick}>
-                    <MoreOptionsIcon />
-                </IconButton>
+                <Tooltip title="More options">
+                    <IconButton
+                        className={classes.button}
+                        onClick={this.handleClick}>
+                        <MoreOptionsIcon className={classes.moreOptions}/>
+                    </IconButton>
+                </Tooltip>
             </div >;
         }
 
@@ -61,7 +66,7 @@ export const FileTreeItem = withStyles(fileTreeItemStyle)(
     });
 
 const getIcon = (item: TreeItem<FileTreeData>) => {
-    switch(item.data.type){
+    switch (item.data.type) {
         case 'directory':
             return ProjectIcon;
         case 'file':
