mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Remove unused createTableStateInjectionToken
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
3362b3d405
commit
29a52920b8
@ -1,4 +1,3 @@
|
|||||||
import React from "react";
|
|
||||||
import { getInjectionToken } from "@ogre-tools/injectable";
|
import { getInjectionToken } from "@ogre-tools/injectable";
|
||||||
import type { KubeObject } from "@k8slens/kube-object/src/kube-object";
|
import type { KubeObject } from "@k8slens/kube-object/src/kube-object";
|
||||||
import type {
|
import type {
|
||||||
@ -6,25 +5,33 @@ import type {
|
|||||||
GeneralKubeObjectListLayoutColumn,
|
GeneralKubeObjectListLayoutColumn,
|
||||||
SpecificKubeListLayoutColumn,
|
SpecificKubeListLayoutColumn,
|
||||||
} from "@k8slens/list-layout/src/kube-list-layout-column";
|
} from "@k8slens/list-layout/src/kube-list-layout-column";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
export interface TableDataContextValue {
|
type Column = (
|
||||||
columns?: (
|
|
||||||
| BaseKubeObjectListLayoutColumn<KubeObject>
|
| BaseKubeObjectListLayoutColumn<KubeObject>
|
||||||
| SpecificKubeListLayoutColumn<KubeObject>
|
| SpecificKubeListLayoutColumn<KubeObject>
|
||||||
| GeneralKubeObjectListLayoutColumn
|
| GeneralKubeObjectListLayoutColumn
|
||||||
)[];
|
);
|
||||||
|
|
||||||
|
export interface TableComponentProps {
|
||||||
|
tableId?: string;
|
||||||
|
columns?: Column[];
|
||||||
|
save: (state: object) => void;
|
||||||
|
load: (tableId: string) => object;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TableDataContextValue {
|
||||||
|
columns?: Column[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export const TableDataContext = React.createContext<TableDataContextValue>({
|
export const TableDataContext = React.createContext<TableDataContextValue>({
|
||||||
columns: [],
|
columns: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
export type CreateTableState<Props> = (context: TableDataContextValue, props: Props) => any;
|
export interface TableComponent {
|
||||||
|
Component: React.ComponentType<TableComponentProps>;
|
||||||
|
}
|
||||||
|
|
||||||
export const createTableStateInjectionToken = getInjectionToken<CreateTableState<any>>({
|
export const tableComponentInjectionToken = getInjectionToken<TableComponent>({
|
||||||
id: "create-table-state-injection-token",
|
|
||||||
});
|
|
||||||
|
|
||||||
export const tableComponentInjectionToken = getInjectionToken<React.ComponentType<any>>({
|
|
||||||
id: "table-component-injection-token",
|
id: "table-component-injection-token",
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user