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.
react-currency-flags
Advanced tools
Readme
Using the images from transferwise/currency-flags, this library uses styled-components
to create React components for use in your app. Please be aware that the images are in base64 format, so if you are concerned with the bundle size, I suggest that you clone the aforementioned TransferWise's repo and store it in a CDN solution of your own (the distributed format that repo is also base64 when built, so simply installing that module won't work).
$ yarn add react-currency-flags
$ npm install react-currency-flags
import CurrencyFlag from 'react-currency-flags';
const CurrencyFlagComponent1 = () => <CurrencyFlag currency="USD" size="sm" />;
const CurrencyFlagComponent2 = () => <CurrencyFlag currency="EUR" width={38} />;
sm
, md
, lg
, xl
You should provide either the size
, or width
or height
; size
will take precedence if all values are provided.
See examples in the examples
folder.
While SVG provides the advantage of scaling, but some flags, such as Mexico's, are very complicated graphically, and would therefore create incredibly large file sizes.
FAQs
React styled-component for currency flags
The npm package react-currency-flags receives a total of 2,243 weekly downloads. As such, react-currency-flags popularity was classified as popular.
We found that react-currency-flags demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.