MegaMenu: Spacing alignment tweaks (#113055)

This commit is contained in:
Yunwen Zheng
2025-10-28 09:34:33 -04:00
committed by GitHub
parent 238244fe5c
commit 79a5b024e1
2 changed files with 5 additions and 10 deletions
@@ -175,7 +175,7 @@ const getStyles = (theme: GrafanaTheme2) => ({
menuItem: css({
display: 'flex',
alignItems: 'center',
gap: theme.spacing(0.5),
gap: theme.spacing(1.5),
height: theme.spacing(4),
paddingLeft: theme.spacing(0.5),
position: 'relative',
@@ -215,13 +215,13 @@ const getStyles = (theme: GrafanaTheme2) => ({
labelWrapper: css({
display: 'flex',
alignItems: 'center',
gap: theme.spacing(2),
gap: theme.spacing(0.75),
minWidth: 0,
paddingLeft: theme.spacing(1),
}),
labelWrapperWithIcon: css({
paddingLeft: theme.spacing(0.5),
gap: theme.spacing(0.5),
gap: theme.spacing(0.75),
}),
hasActiveChild: css({
color: theme.colors.text.primary,
@@ -2,7 +2,7 @@ import { useEffect } from 'react';
import { SelectableValue } from '@grafana/data';
import { locationService } from '@grafana/runtime';
import { Space, Text } from '@grafana/ui';
import { Text } from '@grafana/ui';
import { contextSrv } from 'app/core/services/context_srv';
import { getUserOrganizations, setUserOrganization } from 'app/features/org/state/actions';
import { useDispatch, useSelector } from 'app/types/store';
@@ -33,12 +33,7 @@ export function OrganizationSwitcher() {
}, [dispatch]);
if (orgs?.length <= 1) {
return (
<>
<Space h={1} />
<Text truncate>{Branding.AppTitle}</Text>
</>
);
return <Text truncate>{Branding.AppTitle}</Text>;
}
return <OrganizationSelect orgs={orgs} onSelectChange={onSelectChange} />;