diff --git a/packages/grafana-ui/src/components/Tabs/Tab.tsx b/packages/grafana-ui/src/components/Tabs/Tab.tsx index 1c2bbadaafc..9d82ab13aa3 100644 --- a/packages/grafana-ui/src/components/Tabs/Tab.tsx +++ b/packages/grafana-ui/src/components/Tabs/Tab.tsx @@ -1,14 +1,12 @@ import React, { FC } from 'react'; import { cx } from 'emotion'; -import { Icon } from '..'; import { useTheme } from '../../themes'; -import { IconType } from '../Icon/types'; import { getTabsStyle } from './styles'; export interface TabProps { label: string; active?: boolean; - icon?: IconType; + icon?: string; onChangeTab: () => void; } @@ -18,7 +16,7 @@ export const Tab: FC = ({ label, active, icon, onChangeTab }) => { return (
  • - {icon && } + {icon && } {label}
  • ); diff --git a/packages/grafana-ui/src/components/Tabs/TabsBar.story.tsx b/packages/grafana-ui/src/components/Tabs/TabsBar.story.tsx index 34287fa0004..cb724681dd7 100644 --- a/packages/grafana-ui/src/components/Tabs/TabsBar.story.tsx +++ b/packages/grafana-ui/src/components/Tabs/TabsBar.story.tsx @@ -26,7 +26,12 @@ const tabs = [ export const Simple = () => { const VISUAL_GROUP = 'Visual options'; // --- - const icon = select('Icon', { None: undefined, Heart: 'heart', Star: 'star', User: 'user' }, undefined, VISUAL_GROUP); + const icon = select( + 'Icon', + { None: undefined, Heart: 'fa fa-heart', Star: 'fa fa-star', User: 'fa fa-user' }, + undefined, + VISUAL_GROUP + ); return ( {(state, updateState) => { diff --git a/public/app/core/components/PageHeader/PageHeader.tsx b/public/app/core/components/PageHeader/PageHeader.tsx index 44ef6b20488..430a52bd3ec 100644 --- a/public/app/core/components/PageHeader/PageHeader.tsx +++ b/public/app/core/components/PageHeader/PageHeader.tsx @@ -64,6 +64,7 @@ const Navigation = ({ main }: { main: NavModelItem }) => { label={child.text} active={child.active} key={`${child.url}-${index}`} + icon={child.icon} onChangeTab={() => goToUrl(index)} /> ); diff --git a/public/app/features/admin/__snapshots__/ServerStats.test.tsx.snap b/public/app/features/admin/__snapshots__/ServerStats.test.tsx.snap index 5a6da0ad627..bb2899cf48e 100644 --- a/public/app/features/admin/__snapshots__/ServerStats.test.tsx.snap +++ b/public/app/features/admin/__snapshots__/ServerStats.test.tsx.snap @@ -100,6 +100,9 @@ exports[`ServerStats Should render table with stats 1`] = ` className="css-b418eg" onClick={[Function]} > + Admin