+
+
+
@@ -59,24 +78,24 @@ export function NavBarMenu({ activeItem, navItems, searchBarHidden, onClose }: P
isExpanded={true}
onClick={() => {
reportInteraction('grafana_navigation_collapsed');
- onClose();
+ onMenuClose();
}}
/>
-
-
-
-
-
-
+
+
+
+
+
+
);
}
@@ -109,6 +128,7 @@ const getStyles = (theme: GrafanaTheme2, searchBarHidden?: boolean) => {
zIndex: theme.zIndex.navbarFixed - 1,
position: 'fixed',
top: topPosition,
+ backgroundColor: theme.colors.background.primary,
boxSizing: 'content-box',
[theme.breakpoints.up('md')]: {
borderRight: `1px solid ${theme.colors.border.weak}`,
@@ -154,7 +174,7 @@ const getAnimStyles = (theme: GrafanaTheme2, animationDuration: number) => {
const overlayTransition = {
...commonTransition,
- transitionProperty: 'background-color, box-shadow, width',
+ transitionProperty: 'box-shadow, width',
// this is needed to prevent a horizontal scrollbar during the animation on firefox
'.scrollbar-view': {
overflow: 'hidden !important',
@@ -167,7 +187,6 @@ const getAnimStyles = (theme: GrafanaTheme2, animationDuration: number) => {
};
const overlayOpen = {
- backgroundColor: theme.colors.background.primary,
boxShadow: theme.shadows.z3,
width: '100%',
[theme.breakpoints.up('md')]: {
@@ -178,10 +197,6 @@ const getAnimStyles = (theme: GrafanaTheme2, animationDuration: number) => {
const overlayClosed = {
boxShadow: 'none',
width: 0,
- [theme.breakpoints.up('md')]: {
- backgroundColor: theme.colors.background.primary,
- width: theme.spacing(7),
- },
};
const backdropOpen = {
@@ -194,16 +209,16 @@ const getAnimStyles = (theme: GrafanaTheme2, animationDuration: number) => {
return {
backdrop: {
- appear: css(backdropClosed),
- appearActive: css(backdropTransition, backdropOpen),
- appearDone: css(backdropOpen),
+ enter: css(backdropClosed),
+ enterActive: css(backdropTransition, backdropOpen),
+ enterDone: css(backdropOpen),
exit: css(backdropOpen),
exitActive: css(backdropTransition, backdropClosed),
},
overlay: {
- appear: css(overlayClosed),
- appearActive: css(overlayTransition, overlayOpen),
- appearDone: css(overlayOpen),
+ enter: css(overlayClosed),
+ enterActive: css(overlayTransition, overlayOpen),
+ enterDone: css(overlayOpen),
exit: css(overlayOpen),
exitActive: css(overlayTransition, overlayClosed),
},