![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
react-npm-circular-status-indicator
Advanced tools
A react component to display an analysis or observation result in a coloured Circular Percentage Indicator
A React component to display coloured animated circular progress bar with percentage variations.
A minimal usage will just display coloured circular percentage bar with animation.
let percentage = 75
<CircularStatusIndicator>{percentage}</CircularStatusIndicator>;
The color of the bar by default would be based on the range of the percentage, so:
Range | Default |
---|---|
0-25 | red |
26-50 | yellow |
51-75 | blue |
76-100 | green |
This might have a default height/width of 100px
But User can override:
let percentage = 75
<CircularStatusIndicator radius={50}>{percentage}</CircularStatusIndicator>;
Other options can be passed in as inverted
like so:
let percentage = 75
<CircularStatusIndicator inverted={true}>{percentage}</CircularStatusIndicator>;
In this case, the colors would be reversed;
Range | Default |
---|---|
0-25 | green |
26-50 | blue |
51-75 | yellow |
76-100 | red |
final possibility is where the colour of the bar is passed in as a prop:
<CircularStatusIndicator colour={'#FFC000'}>75</CircularStatusIndicator>
The only additional prop needed would be a text label, 50% font size of the percentage, placed above it and centered of course
<CircularStatusIndicator radius='{200}' textLabel={'Hello!'}>75</CircularStatusIndicator>
import React,{Component} from 'react';
import ReactDOM from 'react-dom';
import CircularStatusIndicator from 'react-npm-circular-status-indicator';
class App extends Component {
render() {
return(
<div>
<h2>Circular Status Indicator</h2>
<CircularStatusIndicator textLabel={'Default'}>80</CircularStatusIndicator>
<CircularStatusIndicator inverted={true} textLabel={'Inverted'}>80</CircularStatusIndicator>
<CircularStatusIndicator colour={'#04c3ff'} textLabel={'Colour'}>80</CircularStatusIndicator>
<CircularStatusIndicator radius={200} textLabel={'Radius'}>70</CircularStatusIndicator>
<CircularStatusIndicator radius={50}>40</CircularStatusIndicator>
</div>
);
}
}
ReactDOM.render(<App />,document.querySelector('.container'));
Clone the repo as a new project:
git clone https://github.com/lobdev/react-npm-circular-status-indicator <circular-status-indicator>
Start Server:
First you have to replace the lib/component/circular_status_indicator.js to server.js in package.json
cd circular-status-indicator
npm i
npm start
Run App:
npm start command automatically initiate browser at 3000 port
http:://localhost:3000
Run tests:
cd circular-status-indicator
npm i
npm test
Make sure you configure your editor/IDE to use:
.editorconfig
.eslintrc
FAQs
A react component to display an analysis or observation result in a coloured Circular Percentage Indicator
The npm package react-npm-circular-status-indicator receives a total of 0 weekly downloads. As such, react-npm-circular-status-indicator popularity was classified as not popular.
We found that react-npm-circular-status-indicator 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.