react count down component with resend functionality.
npm install --save @arshanwer/react-countdown-timer
import * as React from 'react'
import {ReactCountDownTimer} from '@arshanwer/react-countdown-timer';
class Example extends React.Component {
render () {
return (
<ReactCountDownTimer
startTimer={true}
countDown={1}
resetBtnText={'RESTART'}
reset={true}
limitResetTries={true}
TriesCount={2}
resetTimerCallback={() => { }} />
)
}
}
Attributes | Types | Default | Required | Description |
---|---|---|---|---|
startTimer | boolean | - | Yes | Start counter |
countDown | number | - | Yes | time in minutes |
reset | boolean | undefined | No | Enable resend functionality |
resetBtnText | string | undefined | No | Set reset button text |
limitResetTries | boolean | undefined | No | Limit the amount of reset timer |
TriesCount | number | undefined | No | number of tries to reset timer |
resetTimerCallback(...args : any []) | function | undefined | No | Fire custom event on reset |
MIT © Arshanwer