From f86952003527ad917fa3c9106a90a6075d8b2dde Mon Sep 17 00:00:00 2001 From: Lisa Knox Date: Thu, 11 Jan 2024 10:55:17 -0500 Subject: [PATCH] 21317: overflow css Arvados-DCO-1.1-Signed-off-by: Lisa Knox --- .../ms-toolbar-overflow-menu.tsx | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/services/workbench2/src/components/multiselect-toolbar/ms-toolbar-overflow-menu.tsx b/services/workbench2/src/components/multiselect-toolbar/ms-toolbar-overflow-menu.tsx index 207b341b1b..a0ba5cee98 100644 --- a/services/workbench2/src/components/multiselect-toolbar/ms-toolbar-overflow-menu.tsx +++ b/services/workbench2/src/components/multiselect-toolbar/ms-toolbar-overflow-menu.tsx @@ -8,7 +8,7 @@ import classnames from 'classnames'; import { IconButton, Menu, MenuItem, StyleRulesCallback, Tooltip, WithStyles, withStyles } from '@material-ui/core'; import { ArvadosTheme } from 'common/custom-theme'; -type CssRules = 'inOverflowMenu' | 'openMenuButton' | 'menu'; +type CssRules = 'inOverflowMenu' | 'openMenuButton' | 'menu' | 'menuItem' | 'menuElement'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ inOverflowMenu: { @@ -20,6 +20,19 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ right: '10px', }, menu: { + marginLeft: 0, + }, + menuItem: { + '&:hover': { + backgroundColor: 'white', + }, + marginTop: 0, + paddingTop: 0, + paddingLeft: '0.85rem', + height: '2.5rem', + }, + menuElement: { + width: '2rem', } }); @@ -66,6 +79,8 @@ export const OverflowMenu = withStyles(styles)((props: OverflowMenuProps & WithS keepMounted open={open} onClose={handleClose} + disableAutoFocusItem + className={classes.menu} > {React.Children.map(children, (child: any) => { if (!visibilityMap[child.props['data-targetid']]) { @@ -73,9 +88,10 @@ export const OverflowMenu = withStyles(styles)((props: OverflowMenuProps & WithS {React.cloneElement(child, { - className: classnames(child.className, classes.inOverflowMenu), + className: classnames(classes.menuElement), })} ); -- 2.30.2