2.0.1 • Published 3 years ago

react-native-double-tap-without-opacity v2.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

react-native-double-tap

A wrapper component for React Native which supports both double and single tap. Works on both Android and iOS.

Installation

  • npm install --save react-native-double-tap-without-opacity

Usage

import DoubleClick from "react-native-double-tap-without-opacity"
export default class App extends React.Component {
  render() {
    return (
      <View style={styles.container}>
        <DoubleClick
          singleTap={() => {
            console.log("single tap");
          }}
          doubleTap={() => {
            console.log("double tap");
          }}
          delay={200}
        >
          <Text>Tap me 2 times for log </Text>
         
        </DoubleClick>
      </View>
    );
  }
}

Props

PropertyTypeDefaultDescription
delaynumber200Time for delay between taps
singleTapfunctionnullcallback for single tap event
doubleTapfunctionnullcallback for double tap event

License

MIT