-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathtypes.ts
More file actions
72 lines (65 loc) · 1.63 KB
/
types.ts
File metadata and controls
72 lines (65 loc) · 1.63 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import React from 'react';
export interface HTMLElementProps {
title?: string;
style?: React.CSSProperties;
className?: string;
role?: string;
}
export interface IAxis {
x: number;
y: number;
}
export interface ICacheSizes {
sizes: (string | number)[];
sashPosSizes: (string | number)[];
}
export interface ISplitProps extends HTMLElementProps {
children: JSX.Element[];
/**
* Should allowed to resized
*
* default is true
*/
allowResize?: boolean;
/**
* How to split the space
*
* default is vertical
*/
split?: 'vertical' | 'horizontal';
/**
* Only support controlled mode, so it's required
*/
sizes: (string | number)[];
sashRender: (index: number, active: boolean) => React.ReactNode;
onChange: (sizes: number[]) => void;
onDragStart?: (e: MouseEvent) => void;
onDragEnd?: (e: MouseEvent) => void;
className?: string;
sashClassName?: string;
performanceMode?: boolean;
/**
* Specify the size fo resizer
*
* defualt size is 4px
*/
resizerSize?: number;
}
export interface ISashProps {
className?: string;
style: React.CSSProperties;
render: (active: boolean) => React.ReactNode;
onDragStart: React.MouseEventHandler<HTMLDivElement>;
onDragging: React.MouseEventHandler<HTMLDivElement>;
onDragEnd: React.MouseEventHandler<HTMLDivElement>;
}
export interface ISashContentProps {
className?: string;
type?: string;
active?: boolean;
children?: JSX.Element[];
}
export interface IPaneConfigs {
maxSize?: number | string;
minSize?: number | string;
}