New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@lansforsakringar/icons

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lansforsakringar/icons

LFUI icons

  • 2.2.3
  • npm
  • Socket score

Version published
Weekly downloads
371
increased by290.53%
Maintainers
1
Weekly downloads
 
Created
Source

Länsförsäkringar Icons

Crisp SVG icon library for Länsförsäkringar web development.

Full icon reference →

Table of contents

Getting started

npm install @lansforsakringar/components

Usage

Icons ships with svg sprites. They are self-hosted in your project (because of CORS), so you need to copy the icon sprites to your project from this package. This can be done manually, but preferably automaticlly. In below example, we're using copyfiles.

npm install copyfiles --save-dev

Add a script to your package.json. Make sure to keep the exact folder structure inside the sprite folder, so we don't load any unused sprites.

"script": {
 "copy:icons": "copyfiles copyfiles -u 4 node_modules/@lansforsakringar/icons/dist/sprite/**/* src/icons"
}

Now, use the the icons in your project

<svg role="presentation" class="icon" width="20" height="20">
  <use xlink:href="{{path-to-icons}}/sprite/20/icons.svg#icon-wallet-20"></use>
</svg>

The .icon is part of Components and helps with alignment. Colors are controlled with currentColor.

Bugs and feature requests

If you with to report a bug or submit a feature request, feel free to open an issue. The more information that you provide, the better.

Contributing

After cloning this repo, install the dependencies and build the icons.

npm install
npm run build

Working with branches and pull requests

The latest and stable version is always in the main branch. New features and patches are then added through dedicated branches and pull requests.

When working on a new feature, begin by creating a new branch from main. After finishing your work, squash merge main into your branch and then create a pull request.

Please document the changes that you make in the pull request, along with potential changes to existing classes or variables that should be added to a migration guide later on.

Adding an icon

Export icon from sketch/figma and make sure to only use filled outlines of the color #ff0000. That color will be transformed to currentColor when the icon sprites are built.

Place the new icon in src/{size} and build, npm run build.

Linting

The project uses standard. There are no automated tests beyond that.

npm test

Making a release

When the pull request is accepted and merged, a Github Action will automatically create a new minor release and bumb the version. You can control the release type with your commit message

FAQs

Package last updated on 05 Oct 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc