Navigation: use the branding menu logo in topnav (#60227)

use the branding menu logo in topnav
This commit is contained in:
Ashley Harrison 2022-12-13 14:44:18 +00:00 committed by GitHub
parent c2cea076ee
commit c801f030fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,10 +2,12 @@ import { css } from '@emotion/css';
import React from 'react';
import { GrafanaTheme2 } from '@grafana/data';
import { Dropdown, Icon, ToolbarButton, useStyles2 } from '@grafana/ui';
import { Dropdown, ToolbarButton, useStyles2 } from '@grafana/ui';
import { contextSrv } from 'app/core/core';
import { useSelector } from 'app/types';
import { Branding } from '../Branding/Branding';
import { NewsContainer } from './News/NewsContainer';
import { OrganizationSwitcher } from './Organization/OrganizationSwitcher';
import { QuickAdd } from './QuickAdd/QuickAdd';
@ -26,7 +28,7 @@ export function TopSearchBar() {
<div className={styles.layout}>
<TopSearchBarSection>
<a className={styles.logo} href="/" title="Go to home">
<Icon name="grafana" size="xl" />
<Branding.MenuLogo className={styles.img} />
</a>
<OrganizationSwitcher />
</TopSearchBarSection>
@ -74,6 +76,10 @@ const getStyles = (theme: GrafanaTheme2) => ({
justifyContent: 'flex-start',
},
}),
img: css({
height: theme.spacing(3),
width: theme.spacing(3),
}),
logo: css({
display: 'flex',
}),