JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 138
  • Score
    100M100P100Q76802F
  • License MIT

Round country flags

Package Exports

  • round-flags

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (round-flags) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

round-flags

round-flags - provides a round-shaped collection of svg format flags, you can use it with any library or framework you work with.

Collection of over 200 flags

Example with react

import React from 'react;
import { GB } from 'round-flags';

function Example () {
  return <img src={GB} />
}

Also you can import a flag by providing data.

import React from 'react;
import PropTypes from 'prop-types';
import * as images from 'round-flags';

function Example (props) {
  // props just a string 'UA'
  return <img src={images[props.UA]} />
}

Example.propTypes = {
  UA: PropTypes.string,
};

You can import a flag only providing ALPHA-2 code of country.

Example

import { US } from 'round-flags'; /// Flag of United States
import { ES } from 'round-flags'; /// Flag of Spain