1.0.16 • Published 5 years ago

react-native-button-wrapper v1.0.16

Weekly downloads
13
License
MIT
Repository
github
Last release
5 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

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.11

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago