https://github.com/mroads/react-native-button-wrapper
💬 react-native-button-wrapper is a lightweight library to integrate single click and double click in your React Native application that works seamlessly in android and iOS devices.
https://github.com/mroads/react-native-button-wrapper
hacktoberfest hacktoberfest2021 react react-native react-native-button react-native-button-wrapper wrapper
Last synced: 10 months ago
JSON representation
💬 react-native-button-wrapper is a lightweight library to integrate single click and double click in your React Native application that works seamlessly in android and iOS devices.
- Host: GitHub
- URL: https://github.com/mroads/react-native-button-wrapper
- Owner: mroads
- Created: 2020-01-09T21:53:07.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T04:59:05.000Z (about 3 years ago)
- Last Synced: 2025-03-18T13:11:21.278Z (10 months ago)
- Topics: hacktoberfest, hacktoberfest2021, react, react-native, react-native-button, react-native-button-wrapper, wrapper
- Language: JavaScript
- Homepage:
- Size: 3.07 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 31
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-native-button-wrapper
This npm resolve the multiple click issue on a button.

# Setup
### Installation
`$ npm install react-native-button-wrapper --save`
or
`$ yarn add react-native-button-wrapper`
## Usage
### Props
##### Props you may need to pass while implementing. This wrapper default extends the properties of the touchable Opacity.
| Prop | Default | Type | Description |
| :------------- | :-------------: | :------: | :---------------------------------------------------------------------------------------------------------- |
| onPress | () => {} | `function` | Called when user clicked once.|
| onDoublePress | () => {} | `function` | Called when user clicked twice. |
| useNativeBase | false | `bool` | If `true`, the wrapper will return the native base button component. |
### Basic
```javascript
import ButtonWrapper from 'react-native-button-wrapper';
function Button() {
return (
{
}}
>
Button
);
}
```
### Native Base Implementation
```javascript
import ButtonWrapper from 'react-native-button-wrapper';
function Button() {
return (
{
}}
onPress={() => {
}}
>
Button
);
}
```