1 | # React Countdown Clock
|
2 |
|
3 | A HTML 5 canvas countdown clock as a React component
|
4 |
|
5 | ## Demo
|
6 |
|
7 | [pughpugh.github.io/react-countdown-clock](http://pughpugh.github.io/react-countdown-clock)
|
8 |
|
9 | ## Installation
|
10 |
|
11 | ```
|
12 | npm install react-countdown-clock
|
13 | ```
|
14 |
|
15 | ## Usage
|
16 |
|
17 | ```javascript
|
18 | <ReactCountdownClock seconds={60}
|
19 | color="#000"
|
20 | alpha={0.9}
|
21 | size={300}
|
22 | onComplete={myCallback} />
|
23 | ```
|
24 |
|
25 | ## Props
|
26 |
|
27 | * `seconds` to count down
|
28 | * `color` you'd like it to be as a hex/css colour code
|
29 | * `alpha` transparency for component
|
30 | * `size` for height and width of canvas element, in pixels.
|
31 | * `onComplete` callback when timer completes
|
32 |
|
33 | ## Bugs
|
34 |
|
35 | [github.com/pughpugh/react-countdown-clock/issues](https://github.com/pughpugh/react-countdown-clock/issues)
|