diff --git a/public/app/core/components/AppChrome/News/NewsContainer.tsx b/public/app/core/components/AppChrome/News/NewsContainer.tsx index 7ff107020a7..6511dac8b7f 100644 --- a/public/app/core/components/AppChrome/News/NewsContainer.tsx +++ b/public/app/core/components/AppChrome/News/NewsContainer.tsx @@ -1,16 +1,12 @@ import React from 'react'; import { useToggle } from 'react-use'; -import { Drawer, Icon } from '@grafana/ui'; +import { Drawer, ToolbarButton } from '@grafana/ui'; import { DEFAULT_FEED_URL } from 'app/plugins/panel/news/constants'; import { NewsWrapper } from './NewsWrapper'; -interface NewsContainerProps { - buttonCss?: string; -} - -export function NewsContainer({ buttonCss }: NewsContainerProps) { +export function NewsContainer() { const [showNewsDrawer, onToggleShowNewsDrawer] = useToggle(false); const onChildClick = () => { @@ -19,9 +15,7 @@ export function NewsContainer({ buttonCss }: NewsContainerProps) { return ( <> - + {showNewsDrawer && ( diff --git a/public/app/core/components/AppChrome/TopSearchBar.tsx b/public/app/core/components/AppChrome/TopSearchBar.tsx index d3fe6a94d2d..042b4ee3153 100644 --- a/public/app/core/components/AppChrome/TopSearchBar.tsx +++ b/public/app/core/components/AppChrome/TopSearchBar.tsx @@ -2,7 +2,7 @@ import { css } from '@emotion/css'; import React from 'react'; import { GrafanaTheme2 } from '@grafana/data'; -import { Dropdown, Icon, Tooltip, useStyles2 } from '@grafana/ui'; +import { Dropdown, Icon, ToolbarButton, useStyles2 } from '@grafana/ui'; import { contextSrv } from 'app/core/core'; import { useSelector } from 'app/types'; @@ -17,7 +17,6 @@ export function TopSearchBar() { const helpNode = navIndex['help']; const profileNode = navIndex['profile']; - const signInNode = navIndex['signin']; return (
@@ -32,24 +31,18 @@ export function TopSearchBar() {
{helpNode && ( }> - + )} - - {signInNode && ( - - - {signInNode.icon && } - - - )} + {profileNode && ( }> - + )}
@@ -62,6 +55,7 @@ const getStyles = (theme: GrafanaTheme2) => { container: css({ height: TOP_BAR_LEVEL_HEIGHT, display: 'grid', + gap: theme.spacing(0.5), gridTemplateColumns: '1fr 2fr 1fr', padding: theme.spacing(0, 2), alignItems: 'center', @@ -77,25 +71,15 @@ const getStyles = (theme: GrafanaTheme2) => { searchInput: css({}), actions: css({ display: 'flex', - gap: theme.spacing(1), + gap: theme.spacing(0.5), justifyContent: 'flex-end', }), - actionItem: css({ - display: 'flex', - flexGrow: 0, - border: 'none', - boxShadow: 'none', - background: 'none', - alignItems: 'center', - - color: theme.colors.text.secondary, - '&:hover': { - background: theme.colors.background.secondary, - }, + profileButton: css({ img: { borderRadius: '50%', - width: '24px', height: '24px', + marginRight: 0, + width: '24px', }, }), };