Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-swipe-verify

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-swipe-verify

RNSwipeVerify =========

  • 0.0.11
  • npm
  • Socket score

Version published
Weekly downloads
197
increased by64.17%
Maintainers
1
Weekly downloads
 
Created
Source

RNSwipeVerify

A small componenent to Swipe Verify

Installation

npm install --save react-native-swipe-verify

Preview

lo

Important

If the RNSwipeVerify is inside another component with PanResponder the RNSwipeVerify will be cancelled.

Usage

import React, { Component } from 'react';

import {
  View,
  TouchableOpacity, Text,
  Dimensions
} from 'react-native';


const { width } = Dimensions.get('window')

import RNSwipeVerify from './RNSwipeVerify'

export default class App extends Component {

  constructor(props) {
    super(props)

    this.state = {}

  }

  render() {


    return (
      <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>


        <RNSwipeVerify ref={ref => this.swipeVerify = ref}
          width={width - 50}
          buttonSize={60}
          text="Deslice para verificar"
          onVerified={() => {
            alert("Verified 1")
          }} />



        <View style={{ marginTop: 20 }}>
          <RNSwipeVerify ref={ref => this.swipeVerify2 = ref}
            width={width - 50}
            buttonSize={60}
            borderColor="#2962FF"
            buttonColor="#2962FF"
            backgroundColor="#fff"
            textColor="#2962FF"
            text="Deslice para verificar"
            onVerified={() => {
              alert("Verified 2")
            }} />
        </View>



        <View style={{ marginTop: 20 }}>
          <RNSwipeVerify ref={ref => this.swipeVerify3 = ref}
            width={width - 50}
            buttonSize={60}
            borderColor="#fff"
            buttonColor="#37474F"
            backgroundColor="#f5f5f5"
            textColor="#37474F"
            text="Deslice para verificar"
            onVerified={() => {
              alert("Verified 3")
            }} />
        </View>


        <TouchableOpacity onPress={() => {
          this.swipeVerify.reset()
          this.swipeVerify2.reset()
          this.swipeVerify3.reset()
        }} style={{ marginTop: 30 }}>
          <Text style={{ padding: 10, color: '#0091EA', fontSize: 25 }}>RESET</Text>
        </TouchableOpacity>



      </View>
    );
  }
}

Props

nametypedefaultdescription
width (required)numberrequiredthe width of swipe-verify
buttonSize (required)numberrequiredthe button (Icon) size of swipe-verify
backgroundColor (optional)string#F50057background color
buttonColor (optional)string#D50000button background color
icon (optional)imagearrow iconimage to button (only .png or .jpg).
You can use icon={require('../img/swipe.png')} or icon={{ uri: 'http://images.com/swipe-icon.jpg'}}
text (optional)string#D50000text to show
textColor (optional)string#FFFFFFtext color
borderColor (optional)string#D50000border color

Callbacks

nameargumentsnotes
onVerified (required)boollistener to check if the swipe is verified (user has completed swipe)

Methods

nameargumentsnotes
reset()nonereset the swipe-verify to default values

Keywords

FAQs

Package last updated on 23 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc