+ {element}
+ {state.isOpen && (
+
state.close() }}>
+
+
+ state.close()} />
+ {menu}
+ state.close()} />
+
+
+
+ )}
+
+ );
+}
+
+const getStyles = (theme: GrafanaTheme2, isActive?: boolean) => ({
+ container: css`
+ position: relative;
+ color: ${isActive ? theme.colors.text.primary : theme.colors.text.secondary};
+ list-style: none;
+
+ &:hover {
+ background-color: ${theme.colors.action.hover};
+ color: ${theme.colors.text.primary};
+
+ // TODO don't use a hardcoded class here, use isVisible in NavBarDropdown
+ .navbar-dropdown {
+ opacity: 1;
+ visibility: visible;
+ }
+ }
+ `,
+ element: css`
+ background-color: transparent;
+ border: none;
+ color: inherit;
+ display: block;
+ line-height: ${theme.components.sidemenu.width}px;
+ padding: 0;
+ text-align: center;
+ width: ${theme.components.sidemenu.width}px;
+
+ &::before {
+ display: ${isActive ? 'block' : 'none'};
+ content: ' ';
+ position: absolute;
+ left: 0;
+ top: 0;
+ bottom: 0;
+ width: 4px;
+ border-radius: 2px;
+ background-image: ${theme.colors.gradients.brandVertical};
+ }
+
+ &:focus-visible {
+ background-color: ${theme.colors.action.hover};
+ box-shadow: none;
+ color: ${theme.colors.text.primary};
+ outline: 2px solid ${theme.colors.primary.main};
+ outline-offset: -2px;
+ transition: none;
+ }
+ `,
+ icon: css`
+ height: 100%;
+ width: 100%;
+
+ img {
+ border-radius: 50%;
+ height: ${theme.spacing(3)};
+ width: ${theme.spacing(3)};
+ }
+ `,
+});
diff --git a/public/app/core/components/NavBar/NavBarItemWithoutMenu.tsx b/public/app/core/components/NavBar/NavBarItemWithoutMenu.tsx
new file mode 100644
index 00000000000..0076852adb1
--- /dev/null
+++ b/public/app/core/components/NavBar/NavBarItemWithoutMenu.tsx
@@ -0,0 +1,118 @@
+import { GrafanaTheme2 } from '../../../../../packages/grafana-data';
+import { css, cx } from '@emotion/css';
+import React, { ReactNode } from 'react';
+import { Link, useTheme2 } from '../../../../../packages/grafana-ui';
+
+export interface NavBarItemWithoutMenuProps {
+ label: string;
+ children: ReactNode;
+ className?: string;
+ url?: string;
+ target?: string;
+ isActive?: boolean;
+ onClick?: () => void;
+}
+
+export function NavBarItemWithoutMenu({
+ label,
+ children,
+ className,
+ url,
+ target,
+ isActive = false,
+ onClick,
+}: NavBarItemWithoutMenuProps) {
+ const theme = useTheme2();
+ const styles = getNavBarItemWithoutMenuStyles(theme, isActive);
+
+ return (
+