You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@ export default function App() {
72
72
73
73
| key | Type | Required | Description |
74
74
| --- | --- | --- | ---- |
75
-
| expiryTimestamp |number(timestamp)| YES | this will define for how long the timer will be running |
75
+
| expiryTimestamp |Date object| YES | this will define for how long the timer will be running |
76
76
| autoStart | boolean | No | flag to decide if timer should start automatically, by default it is set to `true`|
77
77
| onExpire | Function | No | callback function to be executed once countdown timer is expired |
78
78
@@ -89,7 +89,7 @@ export default function App() {
89
89
| pause | function | function to be called to pause timer |
90
90
| start | function | function if called after pause the timer will continue based on original expiryTimestamp |
91
91
| resume | function | function if called after pause the timer will continue countdown from last paused state |
92
-
| restart | function | function to restart timer with new expiryTimestamp, accept 2 arguments first is the new `expiryTimestamp` of type number(timestamp) and second is `autoStart` of type boolean to decide if it should automatically start after restart or not, default is `true`|
92
+
| restart | function | function to restart timer with new expiryTimestamp, accept 2 arguments first is the new `expiryTimestamp` of type Date object and second is `autoStart` of type boolean to decide if it should automatically start after restart or not, default is `true`|
93
93
94
94
95
95
---
@@ -144,7 +144,7 @@ export default function App() {
144
144
| key | Type | Required | Description |
145
145
| --- | --- | --- | ---- |
146
146
| autoStart | boolean | No | if set to `true` stopwatch will auto start, by default it is set to `false`|
147
-
| offsetTimestamp |number| No | this will define the initial stopwatch offset example: `const stopwatchOffset = new Date(); stopwatchOffset.setSeconds(stopwatchOffset.getSeconds() + 300);` this will result in a 5 minutes offset and stopwatch will start from 0:0:5:0 instead of 0:0:0:0 |
147
+
| offsetTimestamp |Date object| No | this will define the initial stopwatch offset example: `const stopwatchOffset = new Date(); stopwatchOffset.setSeconds(stopwatchOffset.getSeconds() + 300);` this will result in a 5 minutes offset and stopwatch will start from 0:0:5:0 instead of 0:0:0:0 |
0 commit comments