UNPKG

@grafana/runtime

Version:
8 lines (7 loc) 465 B
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>;