1.0.5 • Published 2 years ago

react-otp-resender v1.0.5

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

React Otp Resender

to install run: yarn add react-otp-resender

Usage

Just import the component and pass the second and styles in otp component.

import React from 'react'
import ReactOtpResender from 'react-otp-resender';

class App extends React.Component {

    //callback of resend button
    resendEvent() { 
       // You can do what ever you want & reset timer too.
    }
    
    render() {
      return (
          <div>
              <h1>Otp Timer counter</h1>
               <ReactOtpResender 
                      seconds={120}
                      textStyle={{
                          color: 'white'
                      }}
                      resendBtnText={'Send OTP again'}
                      resendBtnStyle={{
                          color: 'white',
                          backgroundColor: 'transparent', 
                          outline: 'none', 
                          border: 0, 
                          cursor: 'pointer'
                      }}
                      resendFunc={ _ => this.resendEvent()}
                  />
              </div>
          </div>
      )
    }
}
export default App

#API

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago