Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@equinor/eds-icons
Advanced tools
Readme
This package is a collection of the system icons
from the Equinor Design System as javascript objects.
npm install @equinor/eds-icons
If you use Typescript, make sure you have typescript >= 3.8 as a devDependency:
npm install typescript --save-dev
Import svg data:
import { save } from "@equinor/eds-icons"
We have developed a react component to simplify use of the EDS icons library within react.
import { Icon } from '@equinor/eds-core-react'
import { save } from '@equinor/eds-icons'
// Use library approach
Icon.add({ save }) // (this needs only be done once)
<Icon name="save" />
// OR
// Use directly via data prop:
<Icon data={save} />
You can render the EDS icons using plain svg.
⚠️ Due to how Figma parses and exports svg icons the following attributes must be added to your <path>
element; fill-rule="evenodd" clip-rule="evenodd"
.
These are not included to reduce bundle size as they are needed for every icon.
import { save } from '@equinor/eds-icons'
<svg viewBox={`0 0 ${save.width} ${save.height}`}>
<path d={save.svgPathData} fill-rule="evenodd" clip-rule="evenodd">
</svg>
Use EDS Assets in Figma(Equinor Figma account needed🔒) or our icon preview in Storybook for icon names. Spaces in icon names are replaced with underscores.
star-filled -> star_filled
.
{
name: 'star_filled',
prefix: 'eds',
height: '24',
width: '24',
svgPathData: 'M12 16.067l4.947 3.6-1.894-5.814L20 10.334h-6.067l-1.933-6-1.933 6H4l4.947 3.52-1.894 5.814 4.947-3.6z',
}
If you are using NodeJS 13+ for module loading, it now has native ES modules support. Add "type":"module"
to your apps package.json
to enable this.
If you get a syntax error trying to import ES module, try importing the CJS module as not all loaders have support for ES modules yet
The EDS system icons are built on a copy of the Outlined Material Design icons provided open-source by Google. The icons have been customised and renamed for Equinor’s use.
FAQs
Icons from the Equinor Design System
The npm package @equinor/eds-icons receives a total of 14,054 weekly downloads. As such, @equinor/eds-icons popularity was classified as popular.
We found that @equinor/eds-icons demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.