Skip to content

Chi-AnTai/react-native-slide-to-confirm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Native Slide To Confirm

A simple react-native component that let user slide to confirm.

Install

yarn add react-native-slide-to-confirm

Usage

import React, {Component} from 'react';
import { View, TouchableOpacity, Text} from 'react-native';
import SlideToConfirm from 'react-native-slide-to-confirm';

export default class App extends Component {
  render() {
    return (
      <View style={{flex:1,justifyContent:'space-around',alignItems:'center'}}>
        <SlideToConfirm
          ref={ref => this.slideRef = ref}
          width={300}
          onConfirm={()=>{
            console.log('on user confirm')
          }}
          textColor='white'
          pathColor='red'
          pathCoverColor='red'
          sliderColor='white'
          text='Slide To Purchase'
        />
        <TouchableOpacity
          onPress={() => {
            this.slideRef.reset()
          }}
          style={{padding:10,borderWidth: 1, borderColor: 'gray'}}
        >
          <Text>reset</Text>
        </TouchableOpacity>
      </View>
    );
  }
}

Contributors

andytai andytai@gmail.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published