UNPKG

2.01 kBTypeScriptView Raw
1import React from 'react';
2import { Action, Dispatch } from 'redux';
3import { LiftedState, Monitor } from 'redux-devtools';
4import { DockMonitorAction } from './actions';
5import { DockMonitorState } from './reducers';
6interface ExternalProps<S, A extends Action<unknown>> {
7 defaultPosition: 'left' | 'top' | 'right' | 'bottom';
8 defaultIsVisible: boolean;
9 defaultSize: number;
10 toggleVisibilityKey: string;
11 changePositionKey: string;
12 changeMonitorKey?: string;
13 fluid: boolean;
14 dispatch: Dispatch<DockMonitorAction>;
15 children: Monitor<S, A, LiftedState<S, A, unknown>, unknown, Action<unknown>> | Monitor<S, A, LiftedState<S, A, unknown>, unknown, Action<unknown>>[];
16}
17interface DefaultProps {
18 defaultIsVisible: boolean;
19 defaultPosition: 'left' | 'top' | 'right' | 'bottom';
20 defaultSize: number;
21 fluid: boolean;
22}
23export interface DockMonitorProps<S, A extends Action<unknown>> extends LiftedState<S, A, DockMonitorState> {
24 defaultPosition: 'left' | 'top' | 'right' | 'bottom';
25 defaultIsVisible: boolean;
26 defaultSize: number;
27 toggleVisibilityKey: string;
28 changePositionKey: string;
29 changeMonitorKey?: string;
30 fluid: boolean;
31 dispatch: Dispatch<DockMonitorAction>;
32 children: Monitor<S, A, LiftedState<S, A, unknown>, unknown, Action<unknown>> | Monitor<S, A, LiftedState<S, A, unknown>, unknown, Action<unknown>>[];
33}
34declare const _default: (React.ComponentClass<ExternalProps<unknown, Action<unknown>>, any> & {
35 update(monitorProps: ExternalProps<unknown, Action<unknown>>, state: DockMonitorState | undefined, action: DockMonitorAction): DockMonitorState;
36 defaultProps: DefaultProps;
37}) | (React.FunctionComponent<ExternalProps<unknown, Action<unknown>>> & {
38 update(monitorProps: ExternalProps<unknown, Action<unknown>>, state: DockMonitorState | undefined, action: DockMonitorAction): DockMonitorState;
39 defaultProps: DefaultProps;
40});
41export default _default;