Package Exports
- @akash3gupta/react-count-down-timer
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@akash3gupta/react-count-down-timer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
react-count-down-timer
Countdown timer is a common UI component and it is just a simple stop watch kind of UI clock.
Install
npm install @akash3gupta/react-count-down-timerUsage
import React from 'react'
import { ReactCountDownTimer } from '@akash3gupta/react-count-down-timer'
const App = () => {
const durationOfTimer = 20; // in minutes
const handleTimerTick = () => {
console.log('Trigger after every 1 mins');
}
const handleTimerCompleted = () => {
console.log('Trigger after time completed');
}
const customStyles = {
color: 'red',
fontSize: '20px'
}
return <ReactCountDownTimer
id={'your id'} // this is optional prop just to give unique id to element
classes={'your class'} // this is optional prop just to give your custom classes
styles={customStyles} // this is optional prop just to give your custom styles
duration={durationOfTimer}
onTimerTick={handleTimerTick}
onTimerCompleted={handleTimerCompleted}
/>
}
export default AppDemo
