@kinvolk/headlamp-plugin
Version:
The needed infrastructure for building Headlamp plugins.
38 lines (37 loc) • 1.88 kB
TypeScript
export interface DialogProps {
cluster: any;
openConfirmDialog: string;
setOpenConfirmDialog: (value: string) => void;
}
export interface MenuItemProps {
cluster: any;
handleMenuClose: () => void;
setOpenConfirmDialog: (value: string) => void;
}
export type DialogComponent = (props: DialogProps) => React.ReactElement | null;
export type MenuItemComponent = (props: MenuItemProps) => React.ReactElement | null;
/**
* Information about a cluster provider, that is shown on the add cluster page.
*/
export interface ClusterProviderInfo {
/** The title of the provider. */
title: string;
/** An icon component, an imported SVG. */
icon: React.FunctionComponent<React.SVGAttributes<SVGElement>>;
/** Description of the provider. Explaining a bit about what it is. */
description: string;
/** Url for where the Add button should go to. */
url: string;
}
export interface ClusterProviderSliceState {
/** Dialog components that can be rendered by the application, on the Home. */
dialogs: DialogComponent[];
/** Menu items that can be rendered by the application, on the Home page in the cluster action menu. */
menuItems: MenuItemComponent[];
/** Cluster providers for the Add Cluster page. */
clusterProviders: ClusterProviderInfo[];
}
export declare const initialState: ClusterProviderSliceState;
export declare const addDialog: import("@reduxjs/toolkit").ActionCreatorWithPayload<DialogComponent, "clusterProviderSlice/addDialog">, addMenuItem: import("@reduxjs/toolkit").ActionCreatorWithPayload<MenuItemComponent, "clusterProviderSlice/addMenuItem">, addAddClusterProvider: import("@reduxjs/toolkit").ActionCreatorWithPayload<ClusterProviderInfo, "clusterProviderSlice/addAddClusterProvider">;
declare const _default: import("redux").Reducer<ClusterProviderSliceState>;
export default _default;