mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-22 06:00:07 +03:00
Update prop types
This commit is contained in:
parent
6f6ae1ddac
commit
1320e7a315
|
@ -1,6 +1,6 @@
|
||||||
import React, { Component, createRef } from 'react';
|
import React, { Component, createRef } from 'react';
|
||||||
import { tree } from 'd3-state-visualizer';
|
import { tree } from 'd3-state-visualizer';
|
||||||
import type { HierarchyPointNode, Node, StyleValue } from 'd3-state-visualizer';
|
import type { Options } from 'd3-state-visualizer';
|
||||||
import { Action, Dispatch } from 'redux';
|
import { Action, Dispatch } from 'redux';
|
||||||
import { LiftedAction, LiftedState } from '@redux-devtools/core';
|
import { LiftedAction, LiftedState } from '@redux-devtools/core';
|
||||||
import * as themes from 'redux-devtools-themes';
|
import * as themes from 'redux-devtools-themes';
|
||||||
|
@ -12,7 +12,8 @@ const wrapperStyle = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface Props<S, A extends Action<unknown>>
|
export interface Props<S, A extends Action<unknown>>
|
||||||
extends LiftedState<S, A, ChartMonitorState> {
|
extends LiftedState<S, A, ChartMonitorState>,
|
||||||
|
Options {
|
||||||
dispatch: Dispatch<LiftedAction<S, A, ChartMonitorState>>;
|
dispatch: Dispatch<LiftedAction<S, A, ChartMonitorState>>;
|
||||||
preserveScrollTop: boolean;
|
preserveScrollTop: boolean;
|
||||||
select: (state: S) => unknown;
|
select: (state: S) => unknown;
|
||||||
|
@ -20,20 +21,6 @@ export interface Props<S, A extends Action<unknown>>
|
||||||
invertTheme: boolean;
|
invertTheme: boolean;
|
||||||
|
|
||||||
state: S | null;
|
state: S | null;
|
||||||
isSorted: boolean;
|
|
||||||
heightBetweenNodesCoeff: number;
|
|
||||||
widthBetweenNodesCoeff: number;
|
|
||||||
onClickText: (datum: HierarchyPointNode<Node>) => void;
|
|
||||||
tooltipOptions: {
|
|
||||||
disabled: boolean;
|
|
||||||
offset: {
|
|
||||||
left: number;
|
|
||||||
top: number;
|
|
||||||
};
|
|
||||||
indentationSize: number;
|
|
||||||
styles: { [key: string]: StyleValue } | undefined;
|
|
||||||
};
|
|
||||||
chartStyles: { [key: string]: StyleValue } | undefined;
|
|
||||||
defaultIsVisible?: boolean;
|
defaultIsVisible?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import {
|
||||||
} from '@redux-devtools/core';
|
} from '@redux-devtools/core';
|
||||||
import deepmerge from 'deepmerge';
|
import deepmerge from 'deepmerge';
|
||||||
import { Action, Dispatch } from 'redux';
|
import { Action, Dispatch } from 'redux';
|
||||||
import type { HierarchyPointNode, Node } from 'd3-state-visualizer';
|
import type { Options } from 'd3-state-visualizer';
|
||||||
|
|
||||||
import reducer, { ChartMonitorState } from './reducers';
|
import reducer, { ChartMonitorState } from './reducers';
|
||||||
import Chart, { Props } from './Chart';
|
import Chart, { Props } from './Chart';
|
||||||
|
@ -40,37 +40,14 @@ function invertColors(theme: themes.Base16Theme) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ChartMonitorProps<S, A extends Action<unknown>>
|
export interface ChartMonitorProps<S, A extends Action<unknown>>
|
||||||
extends LiftedState<S, A, ChartMonitorState> {
|
extends LiftedState<S, A, ChartMonitorState>,
|
||||||
|
Options {
|
||||||
dispatch: Dispatch<LiftedAction<S, A, ChartMonitorState>>;
|
dispatch: Dispatch<LiftedAction<S, A, ChartMonitorState>>;
|
||||||
preserveScrollTop: boolean;
|
preserveScrollTop: boolean;
|
||||||
select: (state: S) => unknown;
|
select: (state: S) => unknown;
|
||||||
theme: keyof typeof themes | themes.Base16Theme;
|
theme: keyof typeof themes | themes.Base16Theme;
|
||||||
invertTheme: boolean;
|
invertTheme: boolean;
|
||||||
|
|
||||||
state: S | null;
|
|
||||||
isSorted: boolean;
|
|
||||||
heightBetweenNodesCoeff: number;
|
|
||||||
widthBetweenNodesCoeff: number;
|
|
||||||
onClickText: (datum: HierarchyPointNode<Node>) => void;
|
|
||||||
tooltipOptions: unknown;
|
|
||||||
style: {
|
|
||||||
width: number;
|
|
||||||
height: number;
|
|
||||||
node: {
|
|
||||||
colors: {
|
|
||||||
default: string;
|
|
||||||
collapsed: string;
|
|
||||||
parent: string;
|
|
||||||
};
|
|
||||||
radius: number;
|
|
||||||
};
|
|
||||||
text: {
|
|
||||||
colors: {
|
|
||||||
default: string;
|
|
||||||
hover: string;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
defaultIsVisible?: boolean;
|
defaultIsVisible?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user