@redux-devtools/chart-monitor
Version:
Chart monitor for Redux DevTools
25 lines (24 loc) • 1.07 kB
TypeScript
import React, { Component } from 'react';
import type { Options } from 'd3-state-visualizer';
import { base16Themes } from 'react-base16-styling';
import type { Base16Theme } from 'react-base16-styling';
import { Action, Dispatch } from 'redux';
import { LiftedAction, LiftedState } from '@redux-devtools/core';
import { ChartMonitorState } from './reducers';
export interface Props<S, A extends Action<string>> extends LiftedState<S, A, ChartMonitorState>, Options {
dispatch: Dispatch<LiftedAction<S, A, ChartMonitorState>>;
preserveScrollTop: boolean;
select: (state: S) => unknown;
theme: keyof typeof base16Themes | Base16Theme;
invertTheme: boolean;
state: S | null;
defaultIsVisible?: boolean;
}
declare class Chart<S, A extends Action<string>> extends Component<Props<S, A>> {
divRef: React.RefObject<HTMLDivElement>;
renderChart?: (state?: {} | null | undefined) => void;
componentDidMount(): void;
UNSAFE_componentWillReceiveProps(nextProps: Props<S, A>): void;
render(): React.JSX.Element;
}
export default Chart;