Package Exports
- use-open-window
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (use-open-window) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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
import React, { Component } from 'react';
import { Stopwatch } from "hooked-react-stopwatch";
import "hooked-react-stopwatch/css/style.css"; // optional
class App extends Component {
render() {
return (
<div className="App">
<Stopwatch />
</div>
);
}
}
export default App;
Props
StopWatch.propTypes = {
// custom classNames
stopwatchClassName: PropTypes.string,
timeContainerClassName: PropTypes.string,
controlsClassName: PropTypes.string,
playIconClassName: PropTypes.string,
pauseIconClassName: PropTypes.string,
resetIconClassName: PropTypes.string,
renderControls: PropTypes.func, // custom render function for controls section
hideHours: PropTypes.bool, // hide hours
hideMinutes: PropTypes.bool, // hide minutes
hideSeconds: PropTypes.bool, // hide seconds
hideMilliseconds: PropTypes.bool, // hide milliseconds
separators: PropTypes.arrayOf(PropTypes.string) // 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