Skip to content

Commit 3930904

Browse files
committed
start project
0 parents  commit 3930904

16 files changed

+9952
-0
lines changed

.babelrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"presets": ["@babel/env", "@babel/react"],
3+
"plugins": [
4+
"@babel/plugin-proposal-object-rest-spread",
5+
"@babel/plugin-proposal-class-properties"
6+
]
7+
}

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
/lib

.npmignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
docs
2+
src
3+
.babelrc
4+
webpack.config.js

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 Markus Englund
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# React component Count Down Timer
2+
3+
This is a simple count down timer react component.
4+
5+
### Demo
6+
7+
The demo app source code lives inside the `src/docs` folder.
8+
9+
## [Documentation](http://react-slick.neostack.com)
10+
11+
### Installation
12+
13+
**npm**
14+
15+
```bash
16+
npm install count-down-timer --save
17+
```
18+
19+
⚠️ Also install count-down-timer for css
20+
21+
```bash
22+
@import "~count-down-timer/lib/styles.css";
23+
```
24+
25+
26+
### Example
27+
28+
```js
29+
import React from "react";
30+
import CountDownTimer from "count-down-timer";
31+
32+
class SimpleCountDownTimer extends React.Component {
33+
render() {
34+
var settings = {
35+
count: 5432,
36+
border: true,
37+
showTitle: true,
38+
noPoints: true,
39+
};
40+
return (
41+
<CountDownTimer {...settings} />
42+
);
43+
}
44+
}
45+
```
46+
47+
48+
OR
49+
50+
51+
```js
52+
import React from "react";
53+
import CountDownTimer from "count-down-timer";
54+
55+
class SimpleCountDownTimer extends React.Component {
56+
render() {
57+
return (
58+
<CountDownTimer count={5432} border showTitle noPoints />
59+
);
60+
}
61+
}
62+
```
63+
64+
65+
66+
67+
### Common API
68+
69+
| Name | Type | Default | Description |
70+
| ------------ | ------- | ------- | ----------- |
71+
| className | string | `''` | Additional CSS class for the root DOM node |
72+
| count | number | `0` | The count value of the timer base on second |
73+
| border | boolean | `false` | If the value is `true`, it means a count-down-timer has a border |
74+
| showTitle | boolean | `false` | If the value is `true`, it means a count-down-timer has a title top of each section |
75+
| direction | `right` or `left` | `right` | Value to be added or subtracted on each step the slider makes. Must be greater than zero, and `max` - `min` should be evenly divisible by the step value. <br /> When `marks` is not an empty object, `step` can be set to `null`, to make `marks` as steps. |
76+
| noPoints | boolean | `false` | If vertical is `true`, the count-down-timer will be `:` between each section . |
77+
| color | string | `#000` | |
78+
| backgroundColor | string | `#fff` | |
79+
| responsive | boolean | `false` | If `true`, with is responsive. |
80+
| size | `small` or `middle` or `large` or `big` | `middle` | |
81+
| responsive | boolean | `false` | If `true`, with is responsive. |
82+
| hideDay | boolean | `false` | If `true`, hide day. |
83+
| hideHours | boolean | `false` | If `true`, hide hours . |
84+
| dayTitle | string | `Day` | |
85+
| hourTitle | string | `Hour` | |
86+
| minuteTitle | string | `Min` | |
87+
| secondTitle | string | `Sec` | |
88+
| onEnd | Function | () => {} | |
89+
90+
## License
91+
92+
`count-down-timer` is released under the MIT license.

docs/bundle.js

+22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index.html

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
8+
<meta name="description" content="CHANGE THIS">
9+
<title>React component starter</title>
10+
</head>
11+
12+
<body>
13+
<div id="app"></div>
14+
<script type="text/javascript" src="bundle.js"></script></body>
15+
16+
</html>

0 commit comments

Comments
 (0)