1.0.4 • Published 2 years ago

react-native-double-press v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

react-native-double-press

Enhance the functionality of the standard TouchableOpacity component in React Native by seamlessly integrating the capability for double presses. This package provides a DoubleTouchableOpacity component, allowing developers to easily incorporate double-click interactions into their React Native applications.

Installation

npm install react-native-double-press

Usage

import DoubleTouchableOpacity from 'react-native-double-press';

<DoubleTouchableOpacity onPress={onItemPressHandler} onDoublePress={onToggleBookmarkPressHandler}>
  <Text>Press me once or double.</Text>
</DoubleTouchableOpacity>

API

Props

All props are spread onto underlying TouchableOpacity component

NameTypeDescription
onDoublePress((event: GestureResponderEvent) => void) | undefinedCalled when double press was detected.
doublePressDelaynumber | undefinedDefaults to 250ms

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

1.0.4

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago