1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/renderer/components/status-bar/status-bar-registration.ts
Panu Horsmalahti b469ab5425 Move visible to StatusBarRegistration
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
2022-09-07 13:09:23 +03:00

49 lines
1.1 KiB
TypeScript

/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import type { IComputedValue } from "mobx";
/**
* The props for StatusBar item component
*/
export interface StatusBarItemProps {}
/**
* The type defining the registration of a status bar item
*/
export interface StatusBarComponents {
/**
* The component for this registrations
*/
Item: React.ComponentType<StatusBarItemProps>;
/**
* The side of the bottom bar to place this component.
*
* @default "right"
*/
position?: "left" | "right";
}
/**
* The type for registering status bar items from the LensRendererExtension
*/
export interface StatusBarRegistration {
/**
* @deprecated use {@link StatusBarRegistration.components} instead
*/
item?: React.ReactNode | (() => React.ReactNode);
/**
* The newer API, allows for registering a component instead of a ReactNode
*/
components?: StatusBarComponents;
/**
* If specified, controls item visibility
*/
visible?: IComputedValue<boolean>;
}