redux-devtools-dock-monitor
Version:
A resizable and movable dock for Redux DevTools monitors
42 lines (41 loc) • 2.01 kB
TypeScript
import React from 'react';
import { Action, Dispatch } from 'redux';
import { LiftedState, Monitor } from 'redux-devtools';
import { DockMonitorAction } from './actions';
import { DockMonitorState } from './reducers';
interface ExternalProps<S, A extends Action<unknown>> {
defaultPosition: 'left' | 'top' | 'right' | 'bottom';
defaultIsVisible: boolean;
defaultSize: number;
toggleVisibilityKey: string;
changePositionKey: string;
changeMonitorKey?: string;
fluid: boolean;
dispatch: Dispatch<DockMonitorAction>;
children: Monitor<S, A, LiftedState<S, A, unknown>, unknown, Action<unknown>> | Monitor<S, A, LiftedState<S, A, unknown>, unknown, Action<unknown>>[];
}
interface DefaultProps {
defaultIsVisible: boolean;
defaultPosition: 'left' | 'top' | 'right' | 'bottom';
defaultSize: number;
fluid: boolean;
}
export interface DockMonitorProps<S, A extends Action<unknown>> extends LiftedState<S, A, DockMonitorState> {
defaultPosition: 'left' | 'top' | 'right' | 'bottom';
defaultIsVisible: boolean;
defaultSize: number;
toggleVisibilityKey: string;
changePositionKey: string;
changeMonitorKey?: string;
fluid: boolean;
dispatch: Dispatch<DockMonitorAction>;
children: Monitor<S, A, LiftedState<S, A, unknown>, unknown, Action<unknown>> | Monitor<S, A, LiftedState<S, A, unknown>, unknown, Action<unknown>>[];
}
declare const _default: (React.ComponentClass<ExternalProps<unknown, Action<unknown>>, any> & {
update(monitorProps: ExternalProps<unknown, Action<unknown>>, state: DockMonitorState | undefined, action: DockMonitorAction): DockMonitorState;
defaultProps: DefaultProps;
}) | (React.FunctionComponent<ExternalProps<unknown, Action<unknown>>> & {
update(monitorProps: ExternalProps<unknown, Action<unknown>>, state: DockMonitorState | undefined, action: DockMonitorAction): DockMonitorState;
defaultProps: DefaultProps;
});
export default _default;