@grafana/runtime
Version:
Grafana Runtime Library
8 lines (7 loc) • 465 B
TypeScript
export type UsePluginComponent<Props extends object = {}> = (componentId: string) => UsePluginComponentResult<Props>;
export type UsePluginComponentResult<Props = {}> = {
component: React.ComponentType<Props> | undefined | null;
isLoading: boolean;
};
export declare function setPluginComponentHook(hook: UsePluginComponent): void;
export declare function usePluginComponent<Props extends object = {}>(componentId: string): UsePluginComponentResult<Props>;