File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " react-hover" ,
3
- "version" : " 0.4.2 " ,
4
- "description" : " show anything when mouse hover " ,
3
+ "version" : " 0.5.0 " ,
4
+ "description" : " A handy hover tool for React " ,
5
5
"main" : " dist/index.js" ,
6
6
"scripts" : {
7
7
"prepublish" : " parallelshell -w \" npm run build:dist -s\" \" npm run build:example -s\" \" npm run build:bower -s\" " ,
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ export default class TriggerComponent extends Component {
21
21
onMouseOver = { this . onMouseOver . bind ( this ) }
22
22
onMouseOut = { this . onMouseOut . bind ( this ) }
23
23
onMouseMove = { this . onMouseMove . bind ( this ) }
24
+ onTouchStart = { this . onTouchStart . bind ( this ) }
25
+ onTouchEnd = { this . onTouchEnd . bind ( this ) }
24
26
dangerouslySetInnerHTML = { { __html : componentHtml . trigger } }
25
27
>
26
28
</ h1 >
@@ -42,4 +44,13 @@ export default class TriggerComponent extends Component {
42
44
getCursorPos ( e ) ;
43
45
}
44
46
47
+ onTouchStart ( ) {
48
+ const { setVisibility } = this . props ;
49
+ setVisibility ( true ) ;
50
+ }
51
+
52
+ onTouchEnd ( ) {
53
+ const { setVisibility } = this . props ;
54
+ setVisibility ( false ) ;
55
+ }
45
56
}
You can’t perform that action at this time.
0 commit comments