Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
react-color-bar
Advanced tools
This is a color bar built to display data breakdown in a horizontal bar.
Inspired by color bar of Payment calculator
in Redfin.
$ npm i react-color-bar
Run local demo
$ npm install && npm run dev
Go to http://127.0.0.1:8000 to check to demo.
import React from 'react';
import { render } from 'react-dom';
import { FaApple } from 'react-icons/fa';
import ColorBar, { Data } from '../lib/ColorBar';
import './style.css';
function Demo() {
const data: Data[] = [
{
value: 300,
color: '#21bbce',
tooltip: {
text: 'interest is $300',
props: {
type: 'info',
place: 'top',
},
},
legend: {
value: 300,
label: 'interest',
icon: <FaApple />,
},
}, {
value: 200,
color: '#4bc97d',
tooltip: {
text: 'tax is $200',
props: {
type: 'error',
place: 'top',
},
},
legend: {
value: 200,
label: 'tax',
tooltip: {
text: 'legend supports tooltip',
props: {
type: 'error',
place: 'top',
},
},
},
}, {
value: 100,
color: '#eb5be1',
tooltip: {
text: 'insurance is $100',
props: {
type: 'success',
place: 'top',
},
},
legend: {
value: 100,
label: 'insurance',
},
},
{
value: 300,
color: 'red',
tooltip: {
text: "I don't have legend",
props: {
type: 'success',
place: 'bottom',
},
},
},
];
return (
<div className="container">
<h1>Demo of ColorBar</h1>
<ColorBar data={data} />
</div>
);
}
render(<Demo />, document.getElementById('app'));
FAQs
A color bar for displaying data in React.js
The npm package react-color-bar receives a total of 107 weekly downloads. As such, react-color-bar popularity was classified as not popular.
We found that react-color-bar 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.