ScrollBar.d.ts
1.33 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
/// <reference types="node" />
import * as React from 'react';
export interface ScrollBarProps {
prefixCls: string;
scrollTop: number;
scrollHeight: number;
height: number;
count: number;
onScroll: (scrollTop: number) => void;
onStartMove: () => void;
onStopMove: () => void;
}
interface ScrollBarState {
dragging: boolean;
pageY: number;
startTop: number;
visible: boolean;
}
export default class ScrollBar extends React.Component<ScrollBarProps, ScrollBarState> {
moveRaf: number;
scrollbarRef: React.RefObject<HTMLDivElement>;
thumbRef: React.RefObject<HTMLDivElement>;
visibleTimeout: NodeJS.Timeout;
state: ScrollBarState;
componentDidMount(): void;
componentDidUpdate(prevProps: ScrollBarProps): void;
componentWillUnmount(): void;
delayHidden: () => void;
onScrollbarTouchStart: (e: TouchEvent) => void;
onContainerMouseDown: React.MouseEventHandler;
patchEvents: () => void;
removeEvents: () => void;
onMouseDown: (e: React.MouseEvent | TouchEvent) => void;
onMouseMove: (e: MouseEvent | TouchEvent) => void;
onMouseUp: () => void;
getSpinHeight: () => number;
getEnableScrollRange: () => number;
getEnableHeightRange: () => number;
getTop: () => number;
getVisible: () => boolean;
render(): JSX.Element;
}
export {};