mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Convert StatusBarRegistration to use components field (#1598)
* Convert StatusBarRegistration to use components field - More similar to all other *Registration types for extensions - Simpler fix for using the components.Icon type, now accepts functions that return component instance like all other *Registration types - Kept old fix for backwards compatability Signed-off-by: Sebastian Malton <sebastian@malton.name> * fix docs Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
a0e24e0a4d
commit
0727456aa1
7 files changed
+143
-79
No files matched your search
@@ -3,7 +3,18 @@
|
||||
import React from "react";
|
||||
import { BaseRegistry } from "./base-registry";
|
||||
|
||||
export interface StatusBarRegistration {
|
||||
interface StatusBarComponents {
|
||||
Item?: React.ComponentType;
|
||||
}
|
||||
|
||||
interface StatusBarRegistrationV2 {
|
||||
components: StatusBarComponents;
|
||||
}
|
||||
|
||||
export interface StatusBarRegistration extends StatusBarRegistrationV2 {
|
||||
/**
|
||||
* @deprecated use components.Item instead
|
||||
*/
|
||||
item?: React.ReactNode;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user