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

@transferwise/icons

Package Overview
Dependencies
Maintainers
82
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@transferwise/icons

TransferWise SVG icons

  • 0.7.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
162
increased by295.12%
Maintainers
82
Weekly downloads
 
Created
Source

TransferWise icons

npm GitHub release CircleCI npm

This is the TransferWise SVG icon set, as seen in this demo.

The SVG icon sprite and demo are built using create-svg-icon-sprite.

Usage

A helpful general guide for SVG icon sprites - CSSTricks

Installation

npm install --save @transferwise/icons

Usage from a module-based environment

Javascript
import { iconSprite } from '@transferwise/icons';

... // append SVG icon sprite string to HTML
... // create components in your framework if you want to

If you wish to optimise as much as possible and only bundle the icons you need, you can use Webpack plugins to require the icons from the dist/icons directory and create your own sprite and serve it as you choose.

CSS
@import "~@transferwise/icons/dist/icons.min.css";

(or just import it from JS depending on your build system)

Usage from a non-module-based environment

JavaScript
  1. Add node_modules/@transferwise/icons/dist/svg-icon-sprite.js to your bundle.
  2. Use window.svgIconSprite from your code to access the sprite string
  3. Create components in your framework if you want to
CSS
@import "node_modules/@transferwise/icons/dist/icons.min.css";

Usage from server side

Just append the sprite code (manually or in case of Node, by requiring it as a module) to your template and use like explained here.

We recommend using the provided stylesheet for the classes below.

Styles

The package comes with styles (icons.min.css) for icon sizes you should use in your components for consistency.

ClassSize
tw-icon-sm16px
tw-icon-md (default)24px
tw-icon-lg32px
tw-icon-xl40px
tw-icon-xxl48px

Adding/removing/changing icons

  1. Add/remove/change 24x24 SVG icon(s) in the icons folder.
  2. Change package.json version (if doing multiple of these, follow the first one that applies):
    Removing an icon: major release, f.e. 1.2.3 => 2.0.0
    Adding an icon: minor release, f.e. 1.2.3 => 1.3.0
    Changing an icon: patch release, f.e. 1.2.3 => 1.2.4
  3. Add a CHANGELOG.md entry with the version and an explanation of changes
  4. Submit your pull request from a feature branch and get code reviewed.
  5. If the pull request is approved and the CircleCI build passes, you will be able to merge with rebase.
  6. Code will automatically be released to GitHub and published to npm with the version specified in the changelog and package file.
  7. The demo will also automatically be built.

Contributing

  1. Develop
  2. For a single-run check of version match and linting errors, run npm test.
  3. Bump version number in package.json according to semver and add an item that a release will be based on to CHANGELOG.md.
  4. Submit your pull request from a feature branch and get code reviewed.
  5. If the pull request is approved and the CircleCI build passes, you will be able to merge with rebase.
  6. Code will automatically be released to GitHub and published to npm with the version specified in the changelog and package file.

Other

For features and bugs, feel free to add issues or contribute.

FAQs

Package last updated on 15 Jan 2018

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