chore: extract tokens

Signed-off-by: Gabriel <gaccettola@mirantis.com>
This commit is contained in:
Gabriel authored and Gabriel Accettola committed 2023-06-01 19:03:09 +02:00
1 parent 21914db35b
commit 34ca6509b8
3 files changed
+6

No files matched your search

@@ -7,4 +7,10 @@ export type { ReactApplicationChildren } from "./src/react-application/react-app
export { reactApplicationHigherOrderComponentInjectionToken } from "./src/react-application/react-application-higher-order-component-injection-token";
export type { ReactApplicationHigherOrderComponent } from "./src/react-application/react-application-higher-order-component-injection-token";
export { clusterFrameChildComponentInjectionToken } from "./src/cluster-frame/cluster-frame-child-component-injection-token";
export type { ClusterFrameChildComponent } from "./src/cluster-frame/cluster-frame-child-component-injection-token";
export { rootFrameChildComponentInjectionToken } from "./src/root-frame/root-frame-child-component-injection-token";
export type { RootFrameChildComponent } from "./src/root-frame/root-frame-child-component-injection-token";
export { reactApplicationFeature } from "./src/feature";
@@ -0,0 +1,17 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectionToken } from "@ogre-tools/injectable";
import type { IComputedValue } from "mobx";
export interface ClusterFrameChildComponent {
id: string;
Component: React.ElementType;
shouldRender: IComputedValue<boolean>;
}
export const clusterFrameChildComponentInjectionToken = getInjectionToken<ClusterFrameChildComponent>({
id: "cluster-frame-child-component",
});
@@ -0,0 +1,17 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectionToken } from "@ogre-tools/injectable";
import type { IComputedValue } from "mobx";
export interface RootFrameChildComponent {
id: string;
Component: React.ElementType;
shouldRender: IComputedValue<boolean>;
}
export const rootFrameChildComponentInjectionToken = getInjectionToken<RootFrameChildComponent>({
id: "root-frame-child-component",
});