diff --git a/README.md b/README.md
index 2bf2866..6d661d2 100644
--- a/README.md
+++ b/README.md
@@ -21,6 +21,7 @@ export default class App extends React.Component {
console.log("double tap");
}}
delay={200}
+ feedback={true}
>
@@ -37,6 +38,7 @@ export default class App extends React.Component {
| delay | number | 200 | Time for delay between taps |
| singleTap | function | null | callback for single tap event |
| doubleTap | function | null | callback for double tap event |
+| Feedback | boolean | true | Feedback on Tap (Opacity) | |
## License
diff --git a/index.js b/index.js
index f5473e3..8d1b28a 100644
--- a/index.js
+++ b/index.js
@@ -1,10 +1,10 @@
import React, { Component } from "react";
-import { TouchableOpacity } from "react-native";
+import { TouchableOpacity, TouchableWithoutFeedback } from "react-native";
export default class DoubleTap extends Component {
constructor(props) {
super(props);
-
+ console.log(props.feedback)
// time interval between double clicks
this.delayTime = props.delay ? props.delay : 150;
// bool to check whether user tapped once
@@ -13,6 +13,8 @@ export default class DoubleTap extends Component {
this.lastTime = new Date();
// a timer is used to run the single tap event
this.timer = false;
+ //Display visual feedback on touch
+ this.feedback = props.feedback ? props.feedback : true
}
_onTap = () => {
@@ -51,11 +53,11 @@ export default class DoubleTap extends Component {
};
render() {
- return (
-
- {this.props.children}
-
- );
+ return (
+
+ {this.props.children}
+
+ )
}
componentWillUnmount() {