Merge pull request #15610 from drodil/entity_menu_tooltip

feat: add entity context menu tooltip
This commit is contained in:
Ben Lambert
2023-01-11 13:30:39 +01:00
committed by GitHub
2 changed files with 21 additions and 13 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog': patch
---
There is now tooltip in the entity context menu
@@ -22,6 +22,7 @@ import {
MenuItem,
MenuList,
Popover,
Tooltip,
} from '@material-ui/core';
import { makeStyles } from '@material-ui/core/styles';
import BugReportIcon from '@material-ui/icons/BugReport';
@@ -114,19 +115,21 @@ export function EntityContextMenu(props: EntityContextMenuProps) {
return (
<>
<IconButton
aria-label="more"
aria-controls="long-menu"
aria-haspopup="true"
aria-expanded={!!anchorEl}
role="button"
onClick={onOpen}
data-testid="menu-button"
className={classes.button}
id="long-menu"
>
<MoreVert />
</IconButton>
<Tooltip title="More" arrow>
<IconButton
aria-label="more"
aria-controls="long-menu"
aria-haspopup="true"
aria-expanded={!!anchorEl}
role="button"
onClick={onOpen}
data-testid="menu-button"
className={classes.button}
id="long-menu"
>
<MoreVert />
</IconButton>
</Tooltip>
<Popover
open={Boolean(anchorEl)}
onClose={onClose}