X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/e6039bec0497aa7e1391958e5c4f84bbaeef653e..1df2b7a4d6f599828f9ba81b325382fe5947e281:/src/components/dropdown-menu/dropdown-menu.tsx diff --git a/src/components/dropdown-menu/dropdown-menu.tsx b/src/components/dropdown-menu/dropdown-menu.tsx index 98c29c64..cd68d5ba 100644 --- a/src/components/dropdown-menu/dropdown-menu.tsx +++ b/src/components/dropdown-menu/dropdown-menu.tsx @@ -6,42 +6,48 @@ import * as 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; + title: string; } -class DropdownMenu extends React.Component { +interface DropdownMenuState { + anchorEl: any; +} +export class DropdownMenu extends React.Component { state = { anchorEl: undefined }; 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 (
- - {icon} - + + + {icon} + + {children} @@ -57,6 +63,3 @@ class DropdownMenu extends React.Component { this.setState({ anchorEl: event.currentTarget }); } } - - -export default DropdownMenu;