Giter Club home page Giter Club logo

currency-flags's Introduction

currency-flags

This package outputs two CSS files (minified and unminified) with classes for currency codes.

Major version bump: Note that v3 of this library no longer inlines the images with base64 encoding, instead referencing them by wise.com asset URL. To continue self-hosting images, please stay on v2.

How to use

1. Install

npm install --save currency-flags

2. Add CSS to page

3. Use

<div class="currency-flag currency-flag-usd"></div>

The currency-flag selector has a default display of inline-block, size of 24x16 and a background-size of cover. currency-flag-sm, currency-flag-lg and currency-flag-xl modifiers are available.

Rectangular flag source images

While the main CSS file no longer references them, the source images for the rectangular flags are available in src/flags/${currency_code}.png.

Contributing

  1. Clone repo
  2. Add correctly sized (48x32) png files to static-assets
  3. Add a new line to src/styles.css for the new currency, referencing the static asset URL.
  4. Bump version number in package.json according to semver and add an item that a release will be based on to CHANGELOG.md. npm install to ensure the correct version in the lockfile.
  5. Submit your pull request from a feature branch and get code reviewed.
  6. If the pull request is approved and the CircleCI build passes, you will be able to squash and merge.
  7. Code will automatically be released to GitHub and published to npm according to the version specified in the changelog and package.json.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.