1.0.2 • Published 6 years ago

react-time-counter v1.0.2

Weekly downloads
32
License
ISC
Repository
-
Last release
6 years ago

Install

npm i react-time-counter --save

Usage

import  Timer from "react-time-counter"
<Timer/>

Options:

	hours:timer start with allocated hours //default 0
	ex: <Timer hours={1}/>

	minutes:timer start with allocated minutes //default 0
	ex: <Timer minutes={30}/>

	seconds:timer start with allocated seconds//default 0
	ex: <Timer seconds={45}/>

	backward: timer move backward if true// default false
	ex: <Timer backward={true}/>

	stopHours:timer will stop at this hours // default 0
	ex: <Timer stopHours={2}/>

	stopMinutes:timer will stop at this minutes// default 0
	ex: <Timer stopMinutes={20}/>

	stopSeconds:timer will stop at this seconds// default 0
	ex: <Timer stopSeconds={40}/>

	showHours: if you want to hide hoursset false // default true
	ex: <Timer showHours={false}/>

	showMinutes:if you want to hide minutes set false // default true
	ex: <Timer showMinutes={false}/>

	showSeconds:if you want to hide seconds set false // default true
	ex: <Timer showSeconds={false}/>

	label: the label before timer
	ex: <Timer label={<span>Timer </span>} / >

	endLabel:  the label aftertimer
	ex: <Timer endLabel={<span>Hrs</span>} / >

	prefixZero: if set false timer will be 0:0:0 // default true so timer will be 00:00:00
	ex: <Timer prefixZero={false} / >

callback:

if you want to execute callback function after timer complete you can pass callback

		 <Timer  backward={true} stopMinutes={30} callback = {functionname}/>