-
-
Notifications
You must be signed in to change notification settings - Fork 198
Expand file tree
/
Copy pathpoint.tsx
More file actions
56 lines (52 loc) · 1.32 KB
/
point.tsx
File metadata and controls
56 lines (52 loc) · 1.32 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
44
45
46
47
48
49
50
51
52
53
54
55
56
import Tooltip from 'rc-tooltip';
import React from 'react';
import '../../assets/bootstrap_white.less';
const text = <span>Tooltip Text</span>;
const Test: React.FC = () => {
const scrollRef = React.useRef<HTMLDivElement>(null);
return (
<div style={{ padding: 10 }}>
<div
ref={scrollRef}
style={{
border: '1px solid black',
width: '100%',
height: 'calc(100vh - 40px)',
boxSizing: 'border-box',
overflow: 'auto',
}}
>
<div
style={{
background: 'rgba(255,0,0,0.05)',
width: '300%',
height: '200%',
position: 'relative',
}}
>
<Tooltip
placement="top"
overlay={text}
styles={{ body: { width: 300, height: 50 } }}
popupVisible
arrowContent={<div className="rc-tooltip-arrow-inner" />}
>
<div
style={{
background: 'rgba(0,255,0,0.3)',
width: 100,
height: 50,
position: 'absolute',
left: '30%',
top: '30%',
}}
>
Hover Me
</div>
</Tooltip>
</div>
</div>
</div>
);
};
export default Test;