diff --git a/packages/grafana-data/src/types/app.ts b/packages/grafana-data/src/types/app.ts index d2cee306a28..fe23e8fc6f1 100644 --- a/packages/grafana-data/src/types/app.ts +++ b/packages/grafana-data/src/types/app.ts @@ -1,4 +1,4 @@ -import { ComponentClass } from 'react'; +import { ComponentType } from 'react'; import { KeyValue } from './data'; import { NavModel } from './navModel'; import { PluginMeta, GrafanaPlugin, PluginIncludeType } from './plugin'; @@ -48,7 +48,7 @@ export interface AppPluginMeta extends PluginMeta { export class AppPlugin extends GrafanaPlugin> { // Content under: /a/${plugin-id}/* - root?: ComponentClass>; + root?: ComponentType>; rootNav?: NavModel; // Initial navigation model /** @@ -66,7 +66,7 @@ export class AppPlugin extends GrafanaPlugin> { * * NOTE: this structure will change in 7.2+ so that it is managed with a normal react router */ - setRootPage(root: ComponentClass>, rootNav?: NavModel) { + setRootPage(root: ComponentType>, rootNav?: NavModel) { this.root = root; this.rootNav = rootNav; return this; diff --git a/packages/grafana-data/src/types/plugin.ts b/packages/grafana-data/src/types/plugin.ts index e663be6a0d8..d2f027a1f92 100644 --- a/packages/grafana-data/src/types/plugin.ts +++ b/packages/grafana-data/src/types/plugin.ts @@ -1,4 +1,4 @@ -import { ComponentClass } from 'react'; +import { ComponentType } from 'react'; import { KeyValue } from './data'; /** Describes plugins life cycle status */ @@ -159,7 +159,7 @@ export interface PluginConfigPage { icon?: string; id: string; // Unique, in URL - body: ComponentClass>; + body: ComponentType>; } export class GrafanaPlugin {