1.0.7 • Published 3 years ago

react-native-delay-button v1.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

React-Native-Delay-Button

Button with delay execute action.

Install

npm i react-native-delay-button

Import

import DelayButton from 'react-native-delay-button';

Usage

Screenshot

  <DelayButton delayColorActive="#dc3545" customButtonStyle={{width: 250, alignSelf: 'center', textAlign: 'center'}} delayColorInactive="#28a745" buttonMessageInactive="Process" buttonMessageDelayCancel="Cancel action" actionOnClick={()=>Alert.alert('Execute Action')} DelayTime={5}  />

Props for Customization

PropTypeDefaultDescription
delayColorActiveStringColor when the delay started
delayColorInactiveStringColor when the button is not delayed
customButtonStyleObjectButton Style
buttonMessageInactiveStringText in the button when the button is not delayed
buttonMessageDelayCancelStringText when the delayed started
actionOnClickFunctionThe function to execute when the delayed remain time is equal to 0
DelayTimeNumber0Delay seconds to started to execute the actionOnClick Function
animationBooleantrueAnimate indicator change\
1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago