UNPKG
common-hook
Version:
latest (1.3.2)
1.3.2
1.2.0
1.1.0
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
0.0.3
0.0.2
0.0.1
提供项目中常用的 React Hooks
github.com/JainaXiong/common-hook
JainaXiong/common-hook
common-hook
/
es
/
dom
/
useHover.d.ts
12 lines
(11 loc)
•
302 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
export
interface
Options
{
onEnter
?:
() =>
void
;
onLeave
?:
() =>
void
;
onChange
?:
(
isHovering
:
boolean
) =>
void
; }
/** *
@name
监听DOM元素是否鼠标悬停 *
@example
* const isHovering = useHover(ref) */
export
declare
const
useHover
:
(
target
:
any
,
options
?:
Options
) =>
boolean
;