hooked-react-stopwatch
Highly extensible, created without single class
used but with pure ❤️ to Hooks API.
Shipped with basic CSS style!
Installation
npm i hooked-react-stopwatch --save
Alternatively you may use yarn
:
yarn add hooked-react-stopwatch
Link to npm: https://www.npmjs.com/package/hooked-react-stopwatch
Usage
;;; // optional { return <div className="App"> <Stopwatch /> </div> ; } ;
Props
StopWatchpropTypes = // custom classNames stopwatchClassName: PropTypesstring timeContainerClassName: PropTypesstring controlsClassName: PropTypesstring playIconClassName: PropTypesstring pauseIconClassName: PropTypesstring resetIconClassName: PropTypesstring renderControls: PropTypesfunc // custom render function for controls section hideHours: PropTypesbool // hide hours hideMinutes: PropTypesbool // hide minutes hideSeconds: PropTypesbool // hide seconds hideMilliseconds: PropTypesbool // hide milliseconds separators: PropTypes // separators to use between hours/minutes/seconds/milliseconds // separator use example: [":"/*separatorBetweenHoursAndMinutes*/, ":"/*separatorBetweenMinutesAndSeconds*/, "."/*separatorBetweenSecondsAndMilliseconds*/];
License:
Made with 💖 by Bartlomiej Zuber (bartlomiej.zuber@outlook.com) while traveling around the world, and licensed under the MIT License