Removing table context. Pass columns through the props

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev committed 2023-05-25 13:25:03 +03:00
1 parent 6e5fc63953
commit febae16bbb
5 files changed
+14 -30

No files matched your search

-9
View File
@@ -5,7 +5,6 @@ import type {
GeneralKubeObjectListLayoutColumn,
SpecificKubeListLayoutColumn,
} from "@k8slens/list-layout";
import React from "react";
type Column = (
| BaseKubeObjectListLayoutColumn<KubeObject>
@@ -20,14 +19,6 @@ export interface TableComponentProps {
load?: (tableId: string) => object;
}
export interface TableDataContextValue {
columns?: Column[];
}
export const TableDataContext = React.createContext<TableDataContextValue>({
columns: [],
});
export interface TableComponent {
Component: React.ComponentType<TableComponentProps>;
}
+1 -2
View File
@@ -23,7 +23,6 @@
"rimraf": "^4.4.1"
},
"peerDependencies": {
"@ogre-tools/injectable": "^16.1.0",
"react": "^17.0.2"
"@ogre-tools/injectable": "^16.1.0"
}
}