-
Notifications
You must be signed in to change notification settings - Fork 56
/
index.d.ts
71 lines (59 loc) · 2.02 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
61
62
63
64
65
66
67
68
69
70
71
// Type definitions for react-custom-scrollbars-2 4.0
// Project: https://github.com/malte-wessel/react-custom-scrollbars-2
// Definitions by: David-LeBlanc-git <https://github.com/David-LeBlanc-git>
// kittimiyo <https://github.com/kittimiyo>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import * as React from "react";
export as namespace ReactCustomScrollbars;
export interface positionValues {
top: number;
left: number;
clientWidth: number;
clientHeight: number;
scrollWidth: number;
scrollHeight: number;
scrollLeft: number;
scrollTop: number;
}
export interface ScrollbarProps extends React.HTMLProps<Scrollbars> {
onScroll?: React.UIEventHandler<any>;
onScrollFrame?: (values: positionValues) => void;
onScrollStart?: () => void;
onScrollStop?: () => void;
onUpdate?: (values: positionValues) => void;
renderView?: React.ComponentType<any>;
renderTrackHorizontal?: React.ComponentType<any>;
renderTrackVertical?: React.ComponentType<any>;
renderThumbHorizontal?: React.ComponentType<any>;
renderThumbVertical?: React.ComponentType<any>;
tagName?: string;
hideTracksWhenNotNeeded?: boolean;
autoHide?: boolean;
autoHideTimeout?: number;
autoHideDuration?: number;
thumbSize?: number;
thumbMinSize?: number;
universal?: boolean;
autoHeight?: boolean;
autoHeightMin?: number | string;
autoHeightMax?: number | string;
style?: React.CSSProperties;
}
export class Scrollbars extends React.Component<ScrollbarProps> {
scrollTop(top: number): void;
scrollLeft(left: number): void;
scrollToTop(): void;
scrollToBottom(): void;
scrollToLeft(): void;
scrollToRight(): void;
getScrollLeft(): number;
getScrollTop(): number;
getScrollWidth(): number;
getScrollHeight(): number;
getClientWidth(): number;
getClientHeight(): number;
getValues(): positionValues;
container: HTMLDivElement;
}
export default Scrollbars;