1.0.1 • Published 5 years ago

react-native-code-verification-v2 v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

react-native-code-verification

An UI module for user-side pincode verification.

Getting started

$ npm i react-native-code-verification-v2 --s

Props

NameTypeDescriptionDefault
descriptionTextStringA description textPlease enter pincode for entry
spaceColorColorColor of line under digit#FF0000
ColorColorColor of descriptionTextgray
closeButtonColorColorColor of X - close button#FF0000
onEnteredPincodeFunctionA function that returns entered code-
currentEnteredNumberFunctionA function that returns every time a number is pressed-
onCloseViewFunctionOn press close button, will be useful to close view-
onPressTouchIdFunctionTouch Id is not available, but you can make it by yourself-
withTouchIdBooleanIf you do not neet touch id, you can set it to falseTRUE

Screenshots

Usage

import Pincode from 'react-native-code-verification-v2';

// TODO: What to do with the module?
class Example extends Component {
  onEnteredPincode(pin) {
    console.log(pin);
  }
  onCloseView() {
    // Can Close View.
  }
  currentEnteredNumber(number) {
    console.log(number);
  }
  public render() {
    return (
      <View style={styles.container}>
        <Pincode
          onEnteredPincode={this.onEnteredPincode.bind(this)}
          onCloseView={this.onCloseView.bind(this)}
          spaceColor={'#433223'}
          textColor={'#433223'}
          currentEnteredNumber={this.currentEnteredNumber.bind(this)}
        />
      </View>
    );
  }
}

Credentials

MIT, Otel Danagul, Darrell Richards