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

Closes #47255

(cherry picked from commit 38809d73c2)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2022-04-13 16:12:57 +02:00
committed by GitHub
co-authored by kay delaney
parent 5379941bf9
commit 59886859c0
2 changed files with 4 additions and 1 deletions
@@ -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,
@@ -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({