-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathactivation-hover.html
More file actions
42 lines (38 loc) · 1.19 KB
/
activation-hover.html
File metadata and controls
42 lines (38 loc) · 1.19 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="//cdn.jsdelivr.net/highlight.js/9.9.0/styles/solarized-light.min.css">
<script src="//cdn.jsdelivr.net/highlight.js/9.9.0/highlight.min.js"></script>
<link rel="stylesheet" href="styles.css">
<title>Class Name | Code Example | React Cursor Position</title>
</head>
<body>
<pre>
<code>
import React from 'react';
import ReactCursorPosition, { INTERACTIONS } from 'react-cursor-position';
import PositionLabel from './PositionLabel';
import InstructionsLabel from './InstructionsLabel';
export default () => (
<ReactCursorPosition
activationInteractionMouse={INTERACTIONS.HOVER} //default
hoverDelayInMs={250} //default: 0
hoverOffDelayInMs={150} //default: 0
>
{(cursorProps) => (
<div>
<PositionLabel {...cursorProps} />
<InstructionsLabel />
</div>
)}
</ReactCursorPosition>
);
</code>
</pre>
<script>
hljs.initHighlightingOnLoad();
</script>
</body>
</html>