diff --git a/docs/index.js b/docs/index.js index a33a91c..34fefdc 100644 --- a/docs/index.js +++ b/docs/index.js @@ -142,7 +142,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = UseStopwatchDemo;\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _index = __webpack_require__(/*! ../../src/index */ \"./src/index.js\");\n\nvar _Button = __webpack_require__(/*! ./Button */ \"./demo/components/Button.js\");\n\nvar _Button2 = _interopRequireDefault(_Button);\n\nvar _TimerStyled = __webpack_require__(/*! ./TimerStyled */ \"./demo/components/TimerStyled.js\");\n\nvar _TimerStyled2 = _interopRequireDefault(_TimerStyled);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction UseStopwatchDemo() {\n var _useStopwatch = (0, _index.useStopwatch)({ autoStart: true }),\n seconds = _useStopwatch.seconds,\n minutes = _useStopwatch.minutes,\n hours = _useStopwatch.hours,\n days = _useStopwatch.days,\n start = _useStopwatch.start,\n pause = _useStopwatch.pause,\n reset = _useStopwatch.reset;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'h2',\n null,\n 'UseStopwatch Demo'\n ),\n _react2.default.createElement(_TimerStyled2.default, { seconds: seconds, minutes: minutes, hours: hours, days: days }),\n _react2.default.createElement(\n _Button2.default,\n { onClick: start },\n 'Start'\n ),\n _react2.default.createElement(\n _Button2.default,\n { onClick: pause },\n 'Pause'\n ),\n _react2.default.createElement(\n _Button2.default,\n { onClick: reset },\n 'Reset'\n )\n );\n}\n\n//# sourceURL=webpack:///./demo/components/UseStopwatchDemo.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexports.default = UseStopwatchDemo;\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _index = __webpack_require__(/*! ../../src/index */ \"./src/index.js\");\n\nvar _Button = __webpack_require__(/*! ./Button */ \"./demo/components/Button.js\");\n\nvar _Button2 = _interopRequireDefault(_Button);\n\nvar _TimerStyled = __webpack_require__(/*! ./TimerStyled */ \"./demo/components/TimerStyled.js\");\n\nvar _TimerStyled2 = _interopRequireDefault(_TimerStyled);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction UseStopwatchDemo() {\n var _useStopwatch = (0, _index.useStopwatch)({ autoStart: true }),\n seconds = _useStopwatch.seconds,\n minutes = _useStopwatch.minutes,\n hours = _useStopwatch.hours,\n days = _useStopwatch.days,\n start = _useStopwatch.start,\n pause = _useStopwatch.pause,\n reset = _useStopwatch.reset;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'h2',\n null,\n 'UseStopwatch Demo'\n ),\n _react2.default.createElement(_TimerStyled2.default, { seconds: seconds, minutes: minutes, hours: hours, days: days }),\n _react2.default.createElement(\n _Button2.default,\n { onClick: start },\n 'Start'\n ),\n _react2.default.createElement(\n _Button2.default,\n { onClick: pause },\n 'Pause'\n ),\n _react2.default.createElement(\n _Button2.default,\n { onClick: function onClick() {\n var stopwatchOffset = new Date();\n stopwatchOffset.setSeconds(stopwatchOffset.getSeconds() + 300);\n console.log(typeof stopwatchOffset === 'undefined' ? 'undefined' : _typeof(stopwatchOffset));\n reset(stopwatchOffset, true);\n }\n },\n 'Reset'\n )\n );\n}\n\n//# sourceURL=webpack:///./demo/components/UseStopwatchDemo.js?"); /***/ }), diff --git a/package.json b/package.json index 4babe76..3b469a8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-timer-hook", - "version": "3.0.4", + "version": "3.0.5", "description": "React timer hook is a custom react hook built to handle timers(countdown), stopwatch and time logic/state in your react component.", "main": "dist/index.js", "types": "dist/index.d.ts",