Send new user data to server
[arvados-workbench2.git] / src / components / file-tree / file-tree-item.tsx
index 02dd04b4c84e3a4011fe8a9ac4ef5599a540300c..89bf43c66d84d3c6f9f157adb3e84812866ddde2 100644 (file)
@@ -10,7 +10,7 @@ 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,11 @@ export const FileTreeItem = withStyles(fileTreeItemStyle)(
                 <Typography
                     className={classes.sizeInfo}
                     variant="caption">{formatFileSize(item.data.size)}</Typography>
-                <Tooltip title="More options">
+                <Tooltip title="More options" disableFocusListener>
                     <IconButton
                         className={classes.button}
                         onClick={this.handleClick}>
-                        <MoreOptionsIcon />
+                        <MoreOptionsIcon className={classes.moreOptions}/>
                     </IconButton>
                 </Tooltip>
             </div >;