forked from oxpa/react-custom-scrollbars
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
60 lines (52 loc) · 1.67 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
54
55
56
57
58
59
60
declare namespace __RCS {
import React = __React;
interface positionValues {
top: number;
left: number;
clientWidth: number;
clientHeight: number;
scrollWidth: number;
scrollHeight: number;
scrollLeft: number;
scrollTop: number;
}
interface props extends React.HTMLProps<ScrollBar> {
onScroll?: React.UIEventHandler;
onScrollFrame?: (values: positionValues) => void;
onScrollStart?: () => void;
onScrollStop?: () => void;
onUpdate?: (values: positionValues) => void;
renderView?: React.StatelessComponent<any>;
renderTrackHorizontal?: React.StatelessComponent<any>;
renderTrackVertical?: React.StatelessComponent<any>;
renderThumbHorizontal?: React.StatelessComponent<any>;
renderThumbVertical?: React.StatelessComponent<any>;
autoHide?: boolean;
autoHideTimeout?: number;
autoHideDuration?: number;
thumbSize?: number;
thumbMinSize?: number;
universal?: boolean;
}
class ScrollBar extends React.Component<props, {}> {
scrollTop(top: number): void;
scrollLeft(left: number): void;
scrollToTop(): void;
scrollToBottom(): void;
scrollToLeft(): void;
scrollToRight(): void;
getScrollLeft(): number;
getScrollTop(): number;
getScrollWidth(): number;
getScrollHeight(): number;
getWidth(): number;
getHeight(): number;
getValues(): positionValues;
}
}
declare module 'react-custom-scrollbars' {
var Scrollbars: typeof __RCS.ScrollBar;
export {
Scrollbars,
}
}