X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/b6a5b173cd4e9f325f371d26204dfe156d911c20..8360ba81b48f6883b453f13756432a3d599c3042:/src/components/dropdown-menu/dropdown-menu.tsx?ds=sidebyside

diff --git a/src/components/dropdown-menu/dropdown-menu.tsx b/src/components/dropdown-menu/dropdown-menu.tsx
index 73b279b2..bb661bc2 100644
--- a/src/components/dropdown-menu/dropdown-menu.tsx
+++ b/src/components/dropdown-menu/dropdown-menu.tsx
@@ -2,14 +2,16 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from 'react';
+import React from 'react';
 import Menu from '@material-ui/core/Menu';
 import IconButton from '@material-ui/core/IconButton';
 import { PopoverOrigin } from '@material-ui/core/Popover';
+import { Tooltip } from '@material-ui/core';
 
 interface DropdownMenuProps {
     id: string;
     icon: React.ReactElement<any>;
+    title: string;
 }
 
 interface DropdownMenuState {
@@ -22,29 +24,30 @@ export class DropdownMenu extends React.Component<DropdownMenuProps, DropdownMen
     };
 
     transformOrigin: PopoverOrigin = {
-        vertical: "top",
-        horizontal: "center"
+        vertical: -50,
+        horizontal: 0
     };
 
     render() {
-        const { icon, id, children } = this.props;
+        const { icon, id, children, title } = this.props;
         const { anchorEl } = this.state;
         return (
             <div>
-                <IconButton
-                    aria-owns={anchorEl ? id : undefined}
-                    aria-haspopup="true"
-                    color="inherit"
-                    onClick={this.handleOpen}>
-                    {icon}
-                </IconButton>
+                <Tooltip title={title}>
+                    <IconButton
+                        aria-owns={anchorEl ? id : undefined}
+                        aria-haspopup="true"
+                        color="inherit"
+                        onClick={this.handleOpen}>
+                        {icon}
+                    </IconButton>
+                </Tooltip>
                 <Menu
                     id={id}
                     anchorEl={anchorEl}
                     open={Boolean(anchorEl)}
                     onClose={this.handleClose}
                     onClick={this.handleClose}
-                    anchorOrigin={this.transformOrigin}
                     transformOrigin={this.transformOrigin}>
                     {children}
                 </Menu>
