0.1.3 • Published 10 years ago

react-tick v0.1.3

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

react-tick

Countdown timer for React

NPM version Downloads

react-tick

Installation

npm install react-tick

Usage

var React = require('react');
var Tick = require('react-tick');
var ReactDOM = require('react-dom');
ReactDOM.render(
    <Tick
        format="remain: {dd} days {hh} hours {mm} minutes {ss} seconds"
        endTime="2015/12/31 23:59:59"
        onTimeUp={onTimeUp} />,
    mountNode
);

Manifest

format

A string used to format the display string with some variables. HTML tags is supported.

  • dd remain days.
  • hh remain hours.
  • mm remain minutes.
  • ss remain seconds.

endTime

A string to indicate end time, the time format should be yyyy/MM/dd hh:mm:ss like 2012/12/31 23:59:59.

onTimeUp

A function will be executed when time is up.

License

MIT, see the LICENSE file for detail.

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago