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-bound-highlight
Advanced tools
React component for connecting elements hover states
Two directions bound:
Two directions bound with current element highlight ON:
Single direction bound:
Multiple elements in bound:
Custom highlight styles:
Can be used for building side by side editor like this:
npm install react-bound-highlight --save
Wrap needed elements and specify unique id for connected components group:
import BoundHighlight from 'react-bound-highlight';
...
<div>
<BoundHighlight id="group1">Group 1</BoundHighlight>
<BoundHighlight id="group2">Group 2</BoundHighlight>
...
<BoundHighlight id="group1">Group 1</BoundHighlight>
<BoundHighlight id="group2">Group 2</BoundHighlight>
</div>
...
Prop | Description | Type | Default |
---|---|---|---|
id* | unique group bound identifier | string | |
currentHoverHighlightOn | turn on hover highlight on current element | bool | false |
oppositeHoverHighlightOff | turn off current component oposite highlight | bool | false |
defaultStyleOff | turn off default style for highligting | bool | false |
className | custom className | string | 'BoundHighlight' |
htmlTag | wrapper HTML tag | string | 'span' |
children* | nested elements | string, node |
Use classes to override highlighting styles. Set defaultStyleOff=true
prop to turn off default style.
Class | Desciption |
---|---|
BoundHighlight | Main class name, can by override via className prop |
{className}--currentHover | Current hover state className |
{className}--boundHover | Bound hover state className |
Review all examples on storybook:
npm run storybook
npm run test
Run linter:
npm run lint
Fix formatting issues:
npm run lint:fix
MIT
FAQs
Highlight other components when a component is hovered
The npm package react-bound-highlight receives a total of 1 weekly downloads. As such, react-bound-highlight popularity was classified as not popular.
We found that react-bound-highlight 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.