Nav: Icon clickable area fills all available space (#47334)

Closes #47255
This commit is contained in:
kay delaney
2022-04-13 14:41:48 +01:00
committed by GitHub
parent e86b6662a1
commit 38809d73c2
2 changed files with 4 additions and 1 deletions

View File

@ -71,7 +71,6 @@ export function getNavBarItemWithoutMenuStyles(theme: GrafanaTheme2, isActive?:
position: 'relative',
color: isActive ? theme.colors.text.primary : theme.colors.text.secondary,
display: 'grid',
placeItems: 'center',
'&:hover': {
backgroundColor: theme.colors.action.hover,

View File

@ -356,6 +356,7 @@ function CollapsibleNavItem({
onClose();
}}
className={styles.collapsibleMenuItem}
elClassName={styles.collapsibleIcon}
>
{link.img && (
<img src={link.img} alt={`${link.text} logo`} height="24" width="24" style={{ borderRadius: '50%' }} />
@ -392,6 +393,9 @@ const getCollapsibleStyles = (theme: GrafanaTheme2) => ({
height: theme.spacing(6),
width: theme.spacing(7),
display: 'grid',
}),
collapsibleIcon: css({
display: 'grid',
placeContent: 'center',
}),
collapsibleSectionWrapper: css({