Skip to content
This repository was archived by the owner on Jun 21, 2024. It is now read-only.

hsarchive/react-native-hardskilled-double-tap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Double Tap for React Native

Example

Installation

npm install react-native-hardskilled-double-tap --save

Example

import React, { Component } from 'react'
import DoubleTap from 'react-native-hardskilled-double-tap';
import { Text, TouchableNativeFeedback } from 'react-native'

export default class Example extends Component {
    constructor(props) {
        super(props);
    }

    handler() {
        console.warn('DoubleTap clicked!');
    }

    render() {
        return (
            <DoubleTap
                onPress={this.handler} // Handler after double tap on button
                delay={500} // Delay between tapas
                component={TouchableNativeFeedback} // Custom component with onPress (default: TouchableOpacity)
            >
                <Text>Click me pls!</Text>
            </DoubleTap>
        );
    }
}

Hire us via Upwork! | Our website