0.2.0 • Published 8 years ago

app-flag v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 years ago

app-flag

npm Build Status Coverage Status bitHound Overall Score david-dm-status-badge david-dm-status-badge GitHub license

A component that is capable of displaying all country flags with ISO 3166-1-alpha-2 codes.

Browsers Support

Sauce Test Status

Prerequisites

  • Install Node >= 5.6.0
$ brew install node
  • Install NPM >= 3.8.0
$ npm update -g npm

Installation

Install the plugin via NPM:

$ npm install --save app-flag

How To Use

Option 1: CommonJS (ES6/ES2015)
import AppFlag from 'app-flag';
Option 2: Universal Module Definition
<script src="ASSET_HOST/react.min.js"></script>
<script src="ASSET_HOST/react-dom.min.js"></script>
<script src="ASSET_HOST/classnames.min.js"></script>
<script src="ASSET_HOST/app-component.min.js"></script>
<script src="ASSET_HOST/app-flag.min.js"></script>

Remember to copy the flags folder.

Props

code

The country ISO 3166-1-alpha-2 code.

propType: enumCountryCodes defaultProp: 'ad'

path

The flag's path.

propType: string defaultProp: 'flags'

size

The icon's size ratio.

propType: enum('rectangle'|'square') defaultProp: 'rectangle'