Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@launchpad-ui/icons
Advanced tools
An element that supplements content and represents an action or feature within LaunchDarkly.
An element that supplements content and represents an action or feature within LaunchDarkly.
$ yarn add @launchpad-ui/icons
# or
$ npm install @launchpad-ui/icons
The name
prop specifies which icon to render.
import { Icon } from '@launchpad-ui/icons';
const MyIcon = () => <Icon name="info" />;
Unfortunately SVG sprites cannot be accessed cross-domain. The workaround is to fetch the file and inject it into the document to access the icons directly.
Fetch and inject the sprite for Icon
to render icons correctly:
import sprite from '@launchpad-ui/icons/sprite.svg';
fetch(sprite)
.then(async (response) => response.text())
.then((data) => {
const parser = new DOMParser();
const content = parser.parseFromString(data, 'image/svg+xml').documentElement;
content.id = 'lp-icons-sprite';
content.style.display = 'none';
document.body.appendChild(content);
})
.catch((err) => {
console.log('Failed to fetch sprite', err);
});
To minimize latency, you can preload the sprite file accordingly:
<link
rel="preload"
href="{assets_location}/sprite.svg"
as="fetch"
type="image/svg+xml"
crossorigin
/>
FAQs
An element that supplements content and represents an action or feature within LaunchDarkly.
The npm package @launchpad-ui/icons receives a total of 441 weekly downloads. As such, @launchpad-ui/icons popularity was classified as not popular.
We found that @launchpad-ui/icons demonstrated a healthy version release cadence and project activity because the last version was released less than 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.