Chore: Remove remaining IconName type assertions (#54658)

* Chore: Remove remaining IconName type assertions

* fix lints
This commit is contained in:
Josh Hunt
2022-09-06 09:15:36 +01:00
committed by GitHub
parent 77e53f9986
commit 139705611a
12 changed files with 27 additions and 40 deletions

View File

@@ -4,7 +4,7 @@ import { usePrevious } from 'react-use';
import { GrafanaTheme2 } from '@grafana/data';
import { locationService } from '@grafana/runtime';
import { useStyles2, TabsBar, TabContent, Tab, Alert, IconName } from '@grafana/ui';
import { useStyles2, TabsBar, TabContent, Tab, Alert, toIconName } from '@grafana/ui';
import { Layout } from '@grafana/ui/src/components/Layout/Layout';
import { Page } from 'app/core/components/Page/Page';
import { GrafanaRouteComponentProps } from 'app/core/navigation/types';
@@ -85,7 +85,7 @@ export default function PluginDetails({ match, queryParams }: Props): JSX.Elemen
key={tab.label}
label={tab.label}
href={tab.href}
icon={tab.icon as IconName}
icon={toIconName(tab.icon ?? '')}
active={tab.id === pageId}
/>
);