mirror of
https://github.com/grafana/grafana.git
synced 2025-09-27 04:33:58 +08:00
Nav: Icon clickable area fills all available space (#47334)
Closes #47255
This commit is contained in:
@ -71,7 +71,6 @@ export function getNavBarItemWithoutMenuStyles(theme: GrafanaTheme2, isActive?:
|
|||||||
position: 'relative',
|
position: 'relative',
|
||||||
color: isActive ? theme.colors.text.primary : theme.colors.text.secondary,
|
color: isActive ? theme.colors.text.primary : theme.colors.text.secondary,
|
||||||
display: 'grid',
|
display: 'grid',
|
||||||
placeItems: 'center',
|
|
||||||
|
|
||||||
'&:hover': {
|
'&:hover': {
|
||||||
backgroundColor: theme.colors.action.hover,
|
backgroundColor: theme.colors.action.hover,
|
||||||
|
@ -356,6 +356,7 @@ function CollapsibleNavItem({
|
|||||||
onClose();
|
onClose();
|
||||||
}}
|
}}
|
||||||
className={styles.collapsibleMenuItem}
|
className={styles.collapsibleMenuItem}
|
||||||
|
elClassName={styles.collapsibleIcon}
|
||||||
>
|
>
|
||||||
{link.img && (
|
{link.img && (
|
||||||
<img src={link.img} alt={`${link.text} logo`} height="24" width="24" style={{ borderRadius: '50%' }} />
|
<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),
|
height: theme.spacing(6),
|
||||||
width: theme.spacing(7),
|
width: theme.spacing(7),
|
||||||
display: 'grid',
|
display: 'grid',
|
||||||
|
}),
|
||||||
|
collapsibleIcon: css({
|
||||||
|
display: 'grid',
|
||||||
placeContent: 'center',
|
placeContent: 'center',
|
||||||
}),
|
}),
|
||||||
collapsibleSectionWrapper: css({
|
collapsibleSectionWrapper: css({
|
||||||
|
Reference in New Issue
Block a user