Merge branch 'master' of git.curoverse.com:arvados-workbench2 into 14347-advance...
[arvados-workbench2.git] / src / components / file-tree / file-tree-item.tsx
index 9b248e0c8b5f488bae4dca288501df8d724bc2e0..98164ad4204a8fb5d7cea1c4e25ede59a3a5d6b4 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,13 +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}>
-                    <Tooltip title="More options">
-                        <MoreOptionsIcon />
-                    </Tooltip>
-                </IconButton>
+                <Tooltip title="More options">
+                    <IconButton
+                        className={classes.button}
+                        onClick={this.handleClick}>
+                        <MoreOptionsIcon className={classes.moreOptions}/>
+                    </IconButton>
+                </Tooltip>
             </div >;
         }