mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Plugin Extensions: Add context prop to PluginExtensionComponentConfig.component (#75019)
* Add context prop to PluginExtensionComponentConfig.component * Make context prop optional
This commit is contained in:
@@ -84,7 +84,9 @@ export type PluginExtensionComponentConfig<Context extends object = object> = {
|
||||
|
||||
// The React component that will be rendered as the extension
|
||||
// (This component receives the context as a prop when it is rendered. You can just return `null` from the component to hide for certain contexts)
|
||||
component: React.ComponentType;
|
||||
component: React.ComponentType<{
|
||||
context?: Context;
|
||||
}>;
|
||||
|
||||
// The unique identifier of the Extension Point
|
||||
// (Core Grafana extension point ids are available in the `PluginExtensionPoints` enum)
|
||||
|
||||
Reference in New Issue
Block a user