1 | import * as React from "react";
|
2 |
|
3 | export as namespace ReactCustomScrollbars;
|
4 |
|
5 | export interface positionValues {
|
6 | top: number;
|
7 | left: number;
|
8 | clientWidth: number;
|
9 | clientHeight: number;
|
10 | scrollWidth: number;
|
11 | scrollHeight: number;
|
12 | scrollLeft: number;
|
13 | scrollTop: number;
|
14 | }
|
15 |
|
16 | export interface ScrollbarProps extends React.HTMLProps<Scrollbars> {
|
17 | onScroll?: React.UIEventHandler<any> | undefined;
|
18 | onScrollFrame?: ((values: positionValues) => void) | undefined;
|
19 | onScrollStart?: (() => void) | undefined;
|
20 | onScrollStop?: (() => void) | undefined;
|
21 | onUpdate?: ((values: positionValues) => void) | undefined;
|
22 |
|
23 | renderView?: React.FunctionComponent<any> | undefined;
|
24 | renderTrackHorizontal?: React.FunctionComponent<any> | undefined;
|
25 | renderTrackVertical?: React.FunctionComponent<any> | undefined;
|
26 | renderThumbHorizontal?: React.FunctionComponent<any> | undefined;
|
27 | renderThumbVertical?: React.FunctionComponent<any> | undefined;
|
28 |
|
29 | tagName?: string | undefined;
|
30 | hideTracksWhenNotNeeded?: boolean | undefined;
|
31 |
|
32 | autoHide?: boolean | undefined;
|
33 | autoHideTimeout?: number | undefined;
|
34 | autoHideDuration?: number | undefined;
|
35 |
|
36 | thumbSize?: number | undefined;
|
37 | thumbMinSize?: number | undefined;
|
38 | universal?: boolean | undefined;
|
39 |
|
40 | autoHeight?: boolean | undefined;
|
41 | autoHeightMin?: number | string | undefined;
|
42 | autoHeightMax?: number | string | undefined;
|
43 |
|
44 | style?: React.CSSProperties | undefined;
|
45 | }
|
46 |
|
47 | export class Scrollbars extends React.Component<ScrollbarProps> {
|
48 | scrollTop(top: number): void;
|
49 | scrollLeft(left: number): void;
|
50 | scrollToTop(): void;
|
51 | scrollToBottom(): void;
|
52 | scrollToLeft(): void;
|
53 | scrollToRight(): void;
|
54 | getScrollLeft(): number;
|
55 | getScrollTop(): number;
|
56 | getScrollWidth(): number;
|
57 | getScrollHeight(): number;
|
58 | getClientWidth(): number;
|
59 | getClientHeight(): number;
|
60 | getValues(): positionValues;
|
61 | }
|
62 |
|
63 | export default Scrollbars;
|
64 |
|
\ | No newline at end of file |