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