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.
abaabil.icon
Advanced tools
A lightweight SVG icon component for React.
npm install abaabil.icon
import React from 'react';
import Icon from 'abaabil.icon';
function MyApp() {
return (
<Icon
size={32}
iconName="myIcon"
/>
);
}
size
(number, default: 32): Size of the icon.iconName
(string): ID of the icon in the SVG sprite.style
(object): Inline styles for the icon SVG element.Important: This component expects an SVG sprite to be available at the root of your public directory.
Ensure that an SVG sprite is available at [your-domain]/sprite.svg
. Each icon in the sprite should be given an ID, which will be referenced by the iconName
prop.
Example SVG sprite structure:
<svg xmlns="http://www.w3.org/2000/svg">
<symbol id="exampleIcon" viewBox="0 0 24 24">
<!-- SVG path/data for the icon -->
</symbol>
<!-- More icons... -->
</svg>
To use an icon named exampleIcon
from your sprite, utilize the iconName
prop:
<Icon
size={32}
iconName="exampleIcon"
/>
The component will then render the icon using:
<use xlinkHref="/sprite.svg#exampleIcon" />
MIT
FAQs
Unknown package
The npm package abaabil.icon receives a total of 0 weekly downloads. As such, abaabil.icon popularity was classified as not popular.
We found that abaabil.icon demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.