diff --git a/README.md b/README.md index 49ab015..90c669a 100644 --- a/README.md +++ b/README.md @@ -13,13 +13,17 @@ yarn add @cubetiq/react-use-countdown ```js import React from 'react'; import ReactDOM from 'react-dom'; +// import the countdown hook here import { useCountdown } from 'cubetiq-react-use-countdown'; const App = () => { - const { timeleft, start } = useCountdown(); + const { timeleft, start } = useCountdown({ + step: 1000, + }); + return (
- +

Time left: {timeleft}

); @@ -29,6 +33,7 @@ ReactDOM.render(, document.querySelector('#root')); ``` ### Contributors -Project's repository: [https://git.cubetiqs.com/CUBETIQ/react-use-countdown.git](https://git.cubetiqs.com/CUBETIQ/react-use-countdown.git) +Project's repository: [React Countdown](https://git.cubetiqs.com/CUBETIQ/react-use-countdown.git) - [@s.long](https://git.cubetiqs.com/s.long) -- [@sombochea](https://git.cubetiqs.com/sombochea) \ No newline at end of file +- [@sombochea](https://git.cubetiqs.com/sombochea) +- [@cubetiq](https://git.cubetiqs.com/CUBETIQ) \ No newline at end of file diff --git a/example/src/index.js b/example/src/index.js index 5b0ecf4..9988c97 100644 --- a/example/src/index.js +++ b/example/src/index.js @@ -1,12 +1,16 @@ import React from 'react'; import ReactDOM from 'react-dom'; +// import the countdown hook here import { useCountdown } from 'cubetiq-react-use-countdown'; const App = () => { - const { timeleft, start } = useCountdown(); + const { timeleft, start } = useCountdown({ + step: 1000, + }); + return (
- +

Time left: {timeleft}

); diff --git a/package.json b/package.json index 8d7e9e7..e8cd484 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,24 @@ { "name": "@cubetiq/react-use-countdown", - "version": "1.10.5", - "description": "Count down with trigger", + "version": "1.10.6", + "description": "React Countdown with trigger", "main": "./dist/index.js", "types": "./dist/index.d.ts", "author": "SL", "license": "MIT", "private": false, + "contributors": [ + { + "email": "s.long@cubetiqs.com", + "name": "@s.long", + "url": "https://git.cubetiqs.com/s.long" + }, + { + "email": "sombochea@cubetiqs.com", + "name": "@SomboChea", + "url": "https://git.cubetiqs.com/sombochea" + } + ], "keywords": [ "javascript", "typescript",