1.0.16 • Published 4 years ago

react-native-button-wrapper v1.0.16

Weekly downloads
13
License
MIT
Repository
github
Last release
4 years ago

react-native-button-wrapper

This npm resolve the multiple click issue on a button.

npm.io

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.
PropDefaultTypeDescription
onPress() => {}functionCalled when user clicked once.
onDoublePress() => {}functionCalled when user clicked twice.
useNativeBasefalseboolIf true, the wrapper will return the native base button component.

Basic

import ButtonWrapper from 'react-native-button-wrapper';

function Button() {
  return (
    <ButtonWrapper
      onPress={() => {
       <!--- Write your code here --->
      }}
     >
      <Text>Button</Text>              
     </ButtonWrapper>
   );
 }

Native Base Implementation

import ButtonWrapper from 'react-native-button-wrapper';


function Button() {
  return (
    <ButtonWrapper
      useNativeBase
      onDoublePress={() => {
       <!--- Write your code here --->
      }}
      onPress={() => {
       <!--- Write your code here --->
      }}
    >
      <Text>Button</Text>              
    </ButtonWrapper>
  );
}
1.0.16

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.11

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago