UNPKG
@ifed/hook
Version:
latest (1.0.0-beta.4)
1.0.0-beta.4
1.0.0-beta.3
1.0.0-beta.2
1.0.0-beta.1
@ifed/hook
gitee.com/ifed/ifed/blob/master/packages/hook
@ifed/hook
/
lib
/
useDraggableScroll
/
index.d.ts
10 lines
(9 loc)
•
282 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
9
10
import
{
RefObject
}
from
'react'
;
export
default
function
useDraggableScroll
(
ref
:
RefObject
<
HTMLElement
>,
options
?: { direction?:
'vertical'
|
'horizontal'
|
'both'
; }
): {
onMouseDown
:
(
event
: { clientX:
number
; clientY:
number
; }
) =>
void
; };