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.
@virtuslab/tetrisly-icons
Advanced tools
A collection of icons designed by Tetrisly Team: https://tetrisly.com/
A collection of icons designed by Tetrisly Team: https://tetrisly.com/
You can install the library via npm
, yarn
or pnpm
or your other favorite package manager.
npm install @virtuslab/tetrisly-icons
or
yarn add @virtuslab/tetrisly-icons
or
pnpm add @virtuslab/tetrisly-icons
import { Icon } from '@virtuslab/tetrisly-icons';
const App = () => (
<div>
<Icon name="20-bluetooth" />
</div>
);
to change color of the icon, use color
prop:
import { Icon } from '@virtuslab/tetrisly-icons';
const App = () => (
<div>
<Icon name="20-bluetooth" color="#ff0000" />
</div>
);
You can also import icons object which contains all icons as plain React components that looks like this:
import * as React from 'react';
const SvgComponent = (props) => (
<svg width="32px" height="32px" viewBox="0 0 48 1" {...props}>
<path d="M0 0h48v1H0z" fill="currentColor" fillRule="evenodd" />
</svg>
);
export default SvgComponent;
To obtain such component, use icons
object:
import { icons } from '@virtuslab/tetrisly-icons';
const App = () => {
const SVG = icons['20-bluetooth'];
return (
<div>
<SVG />
</div>
);
};
yarn build
- builds the packageyarn dev
- starts the development serveryarn fetch-icons
- fetches icons from Figma and saves them in svg/
folderyarn storybook
- starts storybook serverto test the package locally, run:
yarn link
in the root directory of the package, and then:
yarn link tetrisly-icons
in the project you want to use the package in.
You should change your node version to node 18 (you can use nvm for that).
To use yarn fetch-icons
you need to add a few environment variables to your .env
file:
# .env
FIGMA_API_TOKEN=
FIGMA_FILE_ID=
FIGMA_NODES_IDS=["3691-38992","3691-38993"]
DOWNLOAD_INTERVAL=50
COLORS_TO_REPLACE=["0x272E35"]
API Token you can find in your Figma account settings, File ID you can find in the URL of your Figma file. For example if your link looks like this:
https://www.figma.com/file/hch8YlkIrYbU3raDzjPvCz/Untitled?node-id=0%3A1
then your File ID is hch8YlkIrYbU3raDzjPvCz
.
Nodes IDs are the nodes that contain icons. For example 20x20 or 16x16.
FAQs
A collection of icons designed by Tetrisly Team: https://tetrisly.com/
We found that @virtuslab/tetrisly-icons demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 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.