1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/packages/list-layout/src/kube-list-layout-column.ts
Sebastian Malton d8823085a8 chore: Change name from SafeReactNode to StrictReactNode
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-15 11:56:30 -04:00

25 lines
914 B
TypeScript

/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import type { KubeObject } from "@k8slens/kube-object";
import type { StrictReactNode } from "@k8slens/utilities";
import type { TableSortCallback, SearchFilter, TableCellProps } from "./list-layout-column";
export interface BaseKubeObjectListLayoutColumn<K extends KubeObject> {
id: string;
priority: number;
sortingCallBack?: TableSortCallback<K>;
searchFilter?: SearchFilter<K>;
header: TableCellProps | undefined | null;
content: (item: K) => StrictReactNode | TableCellProps;
}
export interface GeneralKubeObjectListLayoutColumn extends BaseKubeObjectListLayoutColumn<KubeObject> {
kind: string;
apiVersion: string | string[];
}
export interface SpecificKubeListLayoutColumn<K extends KubeObject> extends BaseKubeObjectListLayoutColumn<K> {}