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.4
  • 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 i -S react-native-swipe-verify

Preview

lolo

Usage

import React, { Component } from 'react';

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


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

import RNSwipeVerify from 'react-native-swipe-verify'

export default class App extends Component {

  constructor(props) {
    super(props)

    this.state = {
      verify: false
    }

  }

  render() {

    const { verify } = this.state
    return (
      <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>


        <RNSwipeVerify ref={ref => this.swipeVerify = ref} puzzleSize={60} width={width - 40} onVerify={verify => this.setState({ verify })}
          text={verify ? "VERIFICADO" : "Deslice para verificar"} puzzleColor="#01579B" borderColor={verify ? '#1DE9B6' : '#01579B'}
          textColor={verify ? '#1DE9B6' : '#01579B'} backgroundColor="#fff"
        />

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

      </View>
    );
  }
}

Props

nametypedefaultdescription
width (required)numberrequiredthe width of swiper-verify
puzzleSize (required)numberrequiredthe puzzle zise of swiper-verify
puzzleSize (required)numberrequiredthe puzzle zise of swiper-verify
backgroundColor (optional)string#F50057background color
puzzleColor (optional)string#D50000puzzle background color
text (optional)string#D50000text to show
textColor (optional)string#FFFFFFtext color
borderColor (optional)string#D50000border color

Methods

nameargumentsnotes
onVerify (required)boollistener to check if the swipe was verify

Keywords

FAQs

Package last updated on 22 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