forked from tomkp/react-split-pane
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
53 lines (41 loc) · 1.28 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import * as Prefixer from 'inline-style-prefixer';
import * as React from 'react';
export type Size = string | number;
export interface Props {
allowResize?: boolean;
className?: string;
primary?: 'first' | 'second';
minSize?: Size;
maxSize?: Size;
defaultSize?: Size;
size?: Size;
split?: 'vertical' | 'horizontal';
onDragStarted?: () => void;
onDragFinished?: (newSize: number) => void;
onChange?: (newSize: number) => void;
onResizerClick?: (event: MouseEvent) => void;
onResizerDoubleClick?: (event: MouseEvent) => void;
prefixer?: Prefixer;
style?: React.CSSProperties;
resizerStyle?: React.CSSProperties;
paneStyle?: React.CSSProperties;
pane1Style?: React.CSSProperties;
pane2Style?: React.CSSProperties;
resizerClassName?: string;
step?: number;
}
export interface State {
active: boolean;
resized: boolean;
}
declare class SplitPane extends React.Component<Props, State> {
constructor();
onMouseDown(event: MouseEvent): void;
onTouchStart(event: TouchEvent): void;
onMouseMove(event: MouseEvent): void;
onTouchMove(event: TouchEvent): void;
onMouseUp(): void;
setSize(props: Props, state: State): void;
static defaultProps: Props;
}
export default SplitPane;