From a26bae45e1b2baa6790e321eb815735b05ec20df Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Mon, 23 Jan 2023 09:26:26 +0000 Subject: [PATCH] Navigation: clean up colors in section nav (#61240) * clean up colors in section nav * just underline on hover/focus --- public/app/core/components/PageNew/SectionNavItem.tsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/public/app/core/components/PageNew/SectionNavItem.tsx b/public/app/core/components/PageNew/SectionNavItem.tsx index a615a9026ac..148a3b386f1 100644 --- a/public/app/core/components/PageNew/SectionNavItem.tsx +++ b/public/app/core/components/PageNew/SectionNavItem.tsx @@ -16,7 +16,6 @@ export function SectionNavItem({ item, isSectionRoot = false }: Props) { const styles = useStyles2(getStyles); const children = item.children?.filter((x) => !x.hideFromTabs); - const hasActiveChild = Boolean(children?.length && children.find((x) => x.active)); // If first root child is a section skip the bottom margin (as sections have top margin already) const noRootMargin = isSectionRoot && Boolean(item.children![0].children?.length); @@ -25,7 +24,6 @@ export function SectionNavItem({ item, isSectionRoot = false }: Props) { [styles.link]: true, [styles.activeStyle]: item.active, [styles.isSection]: Boolean(children?.length) || item.isSection, - [styles.hasActiveChild]: hasActiveChild, [styles.isSectionRoot]: isSectionRoot, [styles.noRootMargin]: noRootMargin, }); @@ -73,7 +71,6 @@ const getStyles = (theme: GrafanaTheme2) => { label: activeTabStyle; color: ${theme.colors.text.primary}; background: ${theme.colors.emphasize(theme.colors.background.canvas, 0.03)}; - font-weight: ${theme.typography.fontWeightMedium}; &::before { display: block; @@ -94,13 +91,13 @@ const getStyles = (theme: GrafanaTheme2) => { height: 18, }), isSectionRoot: css({ - color: theme.colors.text.primary, fontSize: theme.typography.h4.fontSize, marginTop: 0, marginBottom: theme.spacing(2), fontWeight: theme.typography.fontWeightMedium, }), isSection: css({ + color: theme.colors.text.primary, fontSize: theme.typography.h5.fontSize, marginTop: theme.spacing(2), fontWeight: theme.typography.fontWeightMedium, @@ -108,8 +105,5 @@ const getStyles = (theme: GrafanaTheme2) => { noRootMargin: css({ marginBottom: 0, }), - hasActiveChild: css({ - color: theme.colors.text.primary, - }), }; };