Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
rc-stopwatch
Advanced tools
React.js implementation of stop watch.
Prop | Type | Optional | Default | Description |
---|---|---|---|---|
timeTextStyle | Object | Yes | {} | Time style object to style stop watch time. |
buttonStyle | Object | Yes | {} | Button Style object to apply common style to all buttons |
startButtonStyle | Object | Yes | {} | Start Button Style react object |
pauseButtonStyle | Object | Yes | {} | Pause Button Style react object |
resetButtonStyle | Object | Yes | {} | Reset Button Style react object |
containerStyle | Object | Yes | {} | Container Style react object |
buttonContainerStyle | Object | Yes | {} | Button Container Style react object |
buttonClass | String | Yes | "" | Common CSS class name |
startButtonClass | String | Yes | "" | Start Button CSS class name |
pauseButtonClass | String | Yes | "" | Pause Button CSS class name |
resetButtonClass | String | Yes | "" | Reset Button CSS class name |
containerClass | String | Yes | "" | Chronometer Container CSS class name |
buttonContainerClass | String | Yes | "" | Button Container CSS class name |
timeTextClass | String | Yes | "" | Time Text CSS class |
startButtonText | String | Yes | "" | Start button text |
pauseButtonText | String | Yes | "" | Pause Button text |
resetButtonText | String | Yes | "" | Reset Button text |
onTimeChange | function | Yes | () => {} | Callback function to get time object { seconds, minutes, hours } |
import React from "react";
import "./App.css";
import Stopwatch from 'rc-stopwatch';
const styles = {
container: {
width: "300px"
},
startBtn: {
backgroundColor: "#daaeee",
color: "#333"
},
btn: {
fontFamily: "monospace"
},
title: {
textAlign: "center",
color: "#add"
},
timeText: {
fontSize: "19pt",
fontWeight: "bold"
},
btnWrapper: {
flexDirection: "column"
},
};
const App = () => (
<div>
<h1 style={styles.title}>React Stopwatch Demo</h1>
<Stopwatch
buttonClass="button"
timeTextStyle={styles.timeText}
buttonContainerStyle={styles.btnWrapper}
onTimeChange={obj => console.log(obj)}
/>
</div>
);
export default App;
FAQs
Simple stopwatch in React.js
The npm package rc-stopwatch receives a total of 0 weekly downloads. As such, rc-stopwatch popularity was classified as not popular.
We found that rc-stopwatch demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.