UNPKG

@kinvolk/headlamp-plugin

Version:

The needed infrastructure for building Headlamp plugins.

30 lines (29 loc) 1.04 kB
/** * This slice contains custom graph elements registered by plugins */ import { PayloadAction } from '@reduxjs/toolkit'; import { ReactNode } from 'react'; import { GraphSource } from './graph/graphModel'; export interface IconDefinition { /** * Icon element */ icon: ReactNode; /** * Color of the icon * @example #FF0000 * @example rgba(255, 100, 20, 0.5) */ color?: string; } export interface GraphViewSliceState { graphSources: GraphSource[]; kindIcons: Record<string, IconDefinition>; } export declare const graphViewSlice: import("@reduxjs/toolkit").Slice<GraphViewSliceState, { addGraphSource(state: import("immer").WritableDraft<GraphViewSliceState>, action: PayloadAction<GraphSource>): void; addKindIcon(state: import("immer").WritableDraft<GraphViewSliceState>, action: PayloadAction<{ kind: string; definition: IconDefinition; }>): void; }, "graphViewSlice", "graphViewSlice", import("@reduxjs/toolkit").SliceSelectors<GraphViewSliceState>>;