Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

react-flag-icon-css

matteocng27.4kMIT1.0.25TypeScript support: definitely-typed

React SVG country flags component

flag-icon, flag-icon-css, flag-icons, react, react-css-modules

readme

A simple React SVG country flags component: it works with Css Modules (default) or standard Css.

NPM version NPM downloads license Build Status Greenkeeper badge dependencies Status devDependencies Status peerDependencies Status codecov Coverage Status

Installation

React Flag Icon Css is distributed as an npm package.

We recommend installing and managing npm packages with yarn or npm 6:

$ yarn add react-flag-icon-css

or with npm 1:

$ npm install --save react-flag-icon-css

1 You can omit --save if using npm >= 5.

Using in a create-react-app app

Apps bootstrapped with create-react-app support this module out of the box, just follow the Basic Usage example and remember to set useCssModules to false (create-react-app does not currently support Css modules in its stable version, you can try the alpha but it will still not work with this module).

Prerequisites for custom apps

We recommend using the webpack 4 module bundler and ecosystem to assemble your app, even though this module works with webpack >= 1 and should also work with other bundlers.

If you are using webpack, you will need to install and configure a few commmonly used modules - see the webpack 4 example project (also available for: webpack 3, webpack 2, and webpack 1).

$ yarn add -D babel-loader css-loader file-loader style-loader extract-text-webpack-plugin

or with npm:

$ npm install --save-dev ...

Basic usage

Import FlagIconFactory from react-flag-icon-css, it accepts the React module as the first argument and creates the FlagIcon component (remove the @flow comment if you don't use Flow, it does not have any effect). This approach ensures that FlagIcon uses your app's React instance, avoiding issues such as two versions of React being loaded at the same time.

/* your-app/your-components-directory/FlagIcon.js */
// @flow
import * as React from 'react'
import FlagIconFactory from 'react-flag-icon-css'

// Please only use `FlagIconFactory` one time in your application, there is no
// need to use it multiple times (it would slow down your app). You may place the
// line below in a `FlagIcon.js` file in your 'components' directory, then
// write `export default FlagIcon` as shown below and import it elsewhere in your app.
const FlagIcon = FlagIconFactory(React)
// If you are not using css modules, write the following:
// const FlagIcon = FlagIconFactory(React, { useCssModules: false })

export default FlagIcon
/* your-app/App.js */
// @flow
import * as React from 'react';
import ReactDOM from 'react-dom'
import FlagIcon from './your-components-directory/FlagIcon.js'

const App = (props = {}) =>
  <div>
    <FlagIcon code={props.code} size={props.size} />
  </div>

const rootEL = document.body.querySelector('#app')

const appProps = { code: 'it', size: '3x' }
ReactDOM.render(<App {...appProps} />, rootEL)

A webpack 3 example project is available (webpack 2 and webpack 1 versions).

:flags: FlagIcon props

The entries marked with &ast; are required.

Prop Type Flow Type Default Description Supported values
code * String FlagIconCodeType 1 | ISO 3166-1-alpha-2 code. The list is here.
size String FlagIconSizeType | lg, 2x, 3x, 4x, 5x
flip String FlagIconFlipType | horizontal, vertical
rotate Number FlagIconRotateType | 30, 60, 90, 180, 270
squared Boolean boolean false Uses the 1x1 image if true.
Component String string span | e.g span, div
className String string | This is always appended as-is to class in the HTML. e.g some-class
styleName String string | This is mapped to a CSS module and appended to class in
the HTML.
e.g some-class
Children String React$Element<*> | React element. e.g <Something />

Remember to always build FlagIcon with FlagIconFactory.

1 Upgrade to version 1.0.17 or later of this module.

:factory: FlagIconFactory

The entries marked with &ast; are required.

Argument Type Flow Type Description Supported values
React * Module ReactModule Your app's React instance. Versions in peerDependencies.
options Object FlagIconOptionsType | See FlagIconFactory options below.

:factory: FlagIconFactory options

Argument Type Flow Type Description Supported values Default
useCssModules Boolean Boolean Use CSS modules styles (your module bundler must be correctly setup). true, false true
customCodes 2 Object Object An object literal whose keys are your custom codes.
Example.
|
themeStyles Object CssModule Set this if useCssModules is true and a) you want to apply styles to FlagIcon
using .theme-base and/or
b) you are using custom flags.
|

2 Upgrade to version 1.0.17 or later of this module.

Facebook's Flow support

This module has 0** Flow errors on flow-bin version: **^0.76.0.

If in your app you are using a Flow version that is the same or newer than that, you should not need any specific configuration excluding the installation of the flow-typed definition for prop-types (you may also take the opportunity to install definitions for all your app's modules using flow-typed).

However, if in your app you are using a newer or particularly older version (not recommended) of Flow, it may throw warnings or errors. Please open an issue or submit a pull request if this module has not yet been made compatible with a newer Flow version.

Custom flags

Required parameters

  • Always set FlagIconFactory options.customCodes to make this module aware of your codes. Otherwise: runtime warnings in development (and Flow errors, if you use it).
  • If using Css Modules, import your styles in someVariable and set FlagIconFactory options.themeStyles to someVariable. Otherwise: runtime Css Modules errors.
  • Else if using standard Css, make sure to import the styles. Otherwise: the custom images won't be loaded.
  • If using Flow use CustomFlagIconFactory and not FlagIconFactory. Otherwise: Flow errors.

Quick example

We recommend organizing your custom flags in a folder similar to example-custom-flags. You may copy-paste it in the root of your app and replace the codes and images.

Example folder structure:

|-- app.js
|-- example-custom-flags
    |--index.js
    |--istyles.css
    |--images
       |--1x1
          |--ex1.svg
          |--ex2.svg
          |--ex3.svg
       |--4x3
          |--ex1.svg
          |--ex2.svg
          |--ex3.svg

Write the styles for each one of your codes, and load the appropriate images:

/* example-custom-flags/styles.css */
/**
 * Note: you can use PostCSS, SASS or whatever preprocessor your
 * app is using here.
 */
.flag-icon-ex1 {
  background-image: url(../images/4x3/ex1.svg);
}

.flag-icon-ex1.flag-icon-squared {
  background-image: url(../images/1x1/ex1.svg);
}

/* ... */

Import the styles and export them and the object with your codes:

/* example-custom-flags/index.js */
import styles from './styles.css'

const codes = {
  ex1: 'Example 1 country',
  ex2: 'Example 2 country',
  ex3: 'Example 3 country',
}

// You can comment or remove the following line if you don't use Facebook's Flow.
export type CustomCodeType = $Keys<typeof codes>

export { styles, codes }

Import CustomFlagIconFactory in your app and build FlagIcon as shown:

/* app.js */
// @flow
import React from 'react'
import { CustomFlagIconFactory } from 'react-flag-icon-css'
import { styles, codes } from './my-custom-flags'

// Using 'react-css-modules'? Use this:
const optionsCssModules = { customCodes: codes, themeStyles: styles }
const FlagIconCssModules = CustomFlagIconFactory(React, optionsCssModules)

// Using global CSS? Use this instead:
const options = { useCssModules: false, customCodes: codes }
const FlagIcon = CustomFlagIconFactory(React, options)

Note: when you build FlagIcon with CustomFlagIconFactory, it can be used with both built-in and custom codes.

Development

Runtime type checking: in development mode (process.env.NODE_ENV !== 'production'), when using unsupported props or prop values, you are warned at runtime by Failed prop type errors in the browser console. Feature powered by prop-types.

Static type checking:

If you use Facebook's flow in your app (otherwise you can skip this section, unless you want to submit a pull request), it should automatically pick up this package's definitions from the .js.flow files that are distributed with it, checking your code accordingly when you run yarn flow. Using the latest Flow version or the version in ./package.json is recommended. We also recommend using a Flow-aware editor such as Nuclide for Atom.

If you use Microsoft's TypeScript in your app (otherwise you can skip this section, unless you want to submit a pull request), the package that contains the type definitions for this module is: @types/react-flag-icon-css.

Contributing

Contributions are welcome:

  • :pencil2: Write code: use a topic branch, follow the AngularJS commit style guidelines and check that yarn prepublish (build, test, type checking, linting ...) returns zero errors before opening a PR. If you want to make major modifications to the code, please open an issue to discuss them first.

  • :bug: Report a bug: first, search all issues. If nothing turns up, open a new issue and be as specific as possible, so that we can reproduce your setup and find out if it is a bug or a configuration issue.

  • :triangular_ruler: Propose a feature: first, search all issues. If nothing turns up, open a new issue and describe what the proposed feature should do, why you think it is important and an example use case.

Thanks! :blue_heart:

Find this module useful?

:star: Starring it lets you keep track of this project and helps more people discover it.

Source of the flags

This project uses the great SVG country flags from flag-icon-css.

License

This project is licensed under the terms of the MIT license.

changelog

1.0.25 (2019-01-16)

  • chore: invert order of 'yarn' and 'npm' install (2f8f94a)
  • chore: remove node 9 and add node 11 to 'travis' (ava does not support node 9) (8c51a9e)
  • chore: upgrade 'babel' to version 7, 'ava' to version 1, 'react' and other modules (7d705b3), closes #110
  • chore(package): update 'flow-bin' to version 0.77.0 (b3a96d8)
  • chore(package): update babel-eslint to version 9.0.0 (8cfce57)
  • chore(package): update eslint-config-prettier to version 3.0.0 (b21bb53)
  • chore(package): update eslint-plugin-flowtype to version 3.0.0 (ebd484e)
  • chore(package): update lockfile package-lock.json (f578807)
  • chore(package): update lockfiles (f2daf1c)
  • chore(package): update lockfiles (59d9ddf)
  • chore(package): update postcss-cli to version 6.0.0 (890c05f)
  • docs: add links to the 'webpack 4' example (eb7390b)

1.0.24 (2018-07-17)

  • chore: add 'exit if not logged in to NPM' step to bumped (a299393)
  • chore: add Node.JS 10 to travis (e2589d8)
  • chore: bring package.json up to date and fix Flow and Eslint errors (0944102)
  • chore: finish upgrading packages and run 'npm audit fix' to fix security issues (d364496)
  • chore: move 'prettier' settings to 'package.json' for format-on-save compatibility (a361673), closes #83
  • chore: remove deprecated 'nsp' and use 'npm audit' (8f08c7f)
  • chore(BREAKING): drop Node.js 4 (67f8471)
  • chore(breaking): remove Node.js 6 and 7 from travis (af1d07a)
  • chore(CI): add Node.js 9 to travis (29e6707)
  • chore(eslint): restore 'no-unexpected-multiline' error rule (bc8298d)
  • chore(package): correct prop-types semver in peerDependencies (5d66ca2)
  • chore(package): update ava to version 0.24.0 (6220a07)
  • chore(package): update ava to version 0.25.0 (634d896)
  • chore(package): update eslint-plugin-babel to version 5.0.0 (6e683a5)
  • chore(package): update flow-bin to version 0.59.0 (b8547ef)
  • chore(package): update lockfiles (839f2b5)
  • chore(package): update nsp to version 3.0.0 (e0502dd)
  • chore(package): update postcss-cli to version 5.0.0 (a76f711)
  • chore(package): update postcss-custom-properties to version 7.0.0 (4573352)
  • chore(package): update stylelint to version 9.0.0 (10a18d1)
  • chore(package): upgrade prettier to version 1.7.4 (04605b8)
  • chore(prettier): run 'yarn prettier' (bda79e4)
  • fix: remove flow folders and hidden files from release bundle shipped to npm (d74f679)
  • fix: use 'npx' to run 'git-dirty' (625d24c)
  • docs: update software versions in docs (1d14898)
  • docs(README): bump webpack versions (5c2a758)
  • docs(README): specify webpack version better (17f7137)
  • chore(bumped) switch changelog generation and lock files (7c2946c)
  • wip (921a31f)
  • test: improve prop-types tests (89a404b)
  • refactor: rename 'ExactValidator' validator to 'NoExtraPropsValidator' (1ee4fbc), closes #49

1.0.23 (2017-10-29)

  • docs(README): improve docs and remove duplication (054c601)
  • fix(flow): use (placeholder) type for React module, fix/improve docs (360ca47)
  • chore(bumped): add lockfile generation and commit (543be4c)
  • chore(package): update lockfiles (33f32d7)

1.0.22 (2017-10-29)

  • docs(README): improve docs and remove duplication (054c601)
  • fix(flow): use (placeholder) type for React module, fix/improve docs (360ca47)
  • chore(bumped): add lockfile generation and commit (543be4c)
  • chore(package): update lockfiles (33f32d7)

1.0.21 (2017-10-29)

  • chore: add 'eslint-config-prettier' (8550cab)
  • chore: add propTypes to DummyComponent (fa8aa03)
  • chore: fix formatting with 'yarn prettier' (3563ed0)
  • chore: remove 'jsdom' as it is unused atm (97f87b7)
  • chore: run 'flow-typed update' (9df98d1)
  • chore: run 'yarn lint:js' (81b8564)
  • chore: upgrade 'flow-bin' and 'stylelint-config-standard' (43e1b69)
  • chore(flow): flow 0.53+ compatibility - 'FlagIcon' types (b080ca8)
  • chore(flow): flow 0.53+ compatibility, 'import' and 'Node' (4154e5a)
  • chore(flow): flow 0.53+ compatibility, fix Flow error (3dceaa0)
  • chore(flow): flow 0.53+, use '' (93f3a4b)
  • chore(flow): remove 'enzyme' and 'tape' (unused) (3255d27)
  • chore(flowconfig): cleanup old, unused entries (7d6f549)
  • chore(package): add '--include-warnings' to 'flow' task (be8d6d2)
  • chore(package): add 'package-lock.json' and regenerate lock files (f854fb6)
  • chore(package): bump 'chalk', 'eslint-plugin-jsx-a11y', fix 'jsdom' version (bc6db3c)
  • chore(package): remove react-addons-test-utils (deprecated) (9d1ae77)
  • chore(package): rename prepublish to prepublishOnly (40b995b)
  • chore(package): run 'ncu -u' and 'ncu -a' to upgrade modules (59640bc)
  • chore(package): run finepack (2517171)
  • chore(package): update 'flow-bin' to version 0.57.3 (148af7d)
  • chore(package): update ava to version 0.21.0 (ce10342)
  • chore(package): update ava to version 0.22.0 (3ef4731)
  • chore(package): update ava to version 0.23.0 (bad0854)
  • chore(package): update babel-eslint to version 8.0.0 (609becb)
  • chore(package): update codecov to version 3.0.0 (f28fd16)
  • chore(package): update coveralls to version 3.0.0 (41b0225)
  • chore(package): update nyc to version 11.0.1 (2fbbee6)
  • chore(package): update package-lock.json (0498887)
  • chore(package): update postcss-discard-comments to version 4.0.0-rc.2 (5c9c734)
  • chore(package): update react-dom to version 16.0.0 (e154175)
  • chore(package): update stylelint to version 8.0.0 (31cd660)
  • chore(package): upgrade cross-env to version 5.0.1 (b210795)
  • chore(package): upgrade flow-bin to version 0.49.1 (68e4113)
  • chore(package): upgrade flow-bin to version 0.52.0 (9f861db)
  • chore(package): upgrade prettier to version 1.4.2 (71822d0)
  • chore(package): upgrade prettier to version 1.4.4 (b618a19)
  • chore(package): upgrade react (to 16) and other packages (7e27f55)
  • chore(test): move functions used by tests to 'internals' (52004bd)
  • chore(travis): add Node.js 8 (b71d5a6)
  • docs(github): add 'css-loader' request (7346cb8)
  • docs(README): add '@flow' to examples, suggest use of FlagIconFactory (fe02f7d)
  • docs(README): add 'className' and 'styleName' to props (9bb1d25)
  • docs(README): fix named import (a5339c0)
  • docs(README): recommend webpack version >= 2 (217eb62)
  • docs(README): replace <code> with backtick, misc updates (3837752)
  • docs(README): update the 'Flow support' section (4229108)
  • docs(README): use new React import syntax (61eb7b7)
  • fix: add 'className' and 'styleName' to prop-types (e3dac5a)
  • fix: correct global 'className' handling (20b9d9a)
  • fix(eslint): correct lib ignore path (68d7e6f)
  • fix(eslint): prevent eslint from crashing (TEMPORARY) (8d049fc)
  • fix(flow): use '' correctly (74b2256)
  • refactor: make 'DummyComponent' more similar to 'FlagIcon' (11b5ae1)
  • refactor: remove dependency on 'react-css-modules' (c51ecf6)
  • refactor: remove unused 'objectKeysApplyFn' and move 'diffArrays' (fef095c)
  • refactor(test): move static data to 'static' folder (b9037a7)
  • test: add new tests, 'snapshot tests', 'react-test-renderer' (945e7b7)
  • test: test that "import React from 'react'" works (fa8d61e)
  • test: update ava snapshots .snap (dfd1e5d)
  • test: upgrade ava to v.0.2.0, refactor and add new tests (9cbfa17)
  • test(flow): refactors and add 'FlagIconOptionsType' and 'loops' tests (975cddb)
  • Release 1.0.19 (875782a)
  • update eslint-config-airbnb to version 16.1.0 (65e8870)

1.0.20 (2017-10-29)

  • chore: add 'eslint-config-prettier' (8550cab)
  • chore: add propTypes to DummyComponent (fa8aa03)
  • chore: fix formatting with 'yarn prettier' (3563ed0)
  • chore: remove 'jsdom' as it is unused atm (97f87b7)
  • chore: run 'flow-typed update' (9df98d1)
  • chore: run 'yarn lint:js' (81b8564)
  • chore: upgrade 'flow-bin' and 'stylelint-config-standard' (43e1b69)
  • chore(flow): flow 0.53+ compatibility - 'FlagIcon' types (b080ca8)
  • chore(flow): flow 0.53+ compatibility, 'import' and 'Node' (4154e5a)
  • chore(flow): flow 0.53+ compatibility, fix Flow error (3dceaa0)
  • chore(flow): flow 0.53+, use '' (93f3a4b)
  • chore(flow): remove 'enzyme' and 'tape' (unused) (3255d27)
  • chore(flowconfig): cleanup old, unused entries (7d6f549)
  • chore(package): add '--include-warnings' to 'flow' task (be8d6d2)
  • chore(package): add 'package-lock.json' and regenerate lock files (f854fb6)
  • chore(package): bump 'chalk', 'eslint-plugin-jsx-a11y', fix 'jsdom' version (bc6db3c)
  • chore(package): remove react-addons-test-utils (deprecated) (9d1ae77)
  • chore(package): rename prepublish to prepublishOnly (40b995b)
  • chore(package): run 'ncu -u' and 'ncu -a' to upgrade modules (59640bc)
  • chore(package): run finepack (2517171)
  • chore(package): update 'flow-bin' to version 0.57.3 (148af7d)
  • chore(package): update ava to version 0.21.0 (ce10342)
  • chore(package): update ava to version 0.22.0 (3ef4731)
  • chore(package): update ava to version 0.23.0 (bad0854)
  • chore(package): update babel-eslint to version 8.0.0 (609becb)
  • chore(package): update codecov to version 3.0.0 (f28fd16)
  • chore(package): update coveralls to version 3.0.0 (41b0225)
  • chore(package): update nyc to version 11.0.1 (2fbbee6)
  • chore(package): update package-lock.json (0498887)
  • chore(package): update postcss-discard-comments to version 4.0.0-rc.2 (5c9c734)
  • chore(package): update react-dom to version 16.0.0 (e154175)
  • chore(package): update stylelint to version 8.0.0 (31cd660)
  • chore(package): upgrade cross-env to version 5.0.1 (b210795)
  • chore(package): upgrade flow-bin to version 0.49.1 (68e4113)
  • chore(package): upgrade flow-bin to version 0.52.0 (9f861db)
  • chore(package): upgrade prettier to version 1.4.2 (71822d0)
  • chore(package): upgrade prettier to version 1.4.4 (b618a19)
  • chore(package): upgrade react (to 16) and other packages (7e27f55)
  • chore(test): move functions used by tests to 'internals' (52004bd)
  • chore(travis): add Node.js 8 (b71d5a6)
  • docs(github): add 'css-loader' request (7346cb8)
  • docs(README): add '@flow' to examples, suggest use of FlagIconFactory (fe02f7d)
  • docs(README): add 'className' and 'styleName' to props (9bb1d25)
  • docs(README): fix named import (a5339c0)
  • docs(README): recommend webpack version >= 2 (217eb62)
  • docs(README): replace <code> with backtick, misc updates (3837752)
  • docs(README): update the 'Flow support' section (4229108)
  • docs(README): use new React import syntax (61eb7b7)
  • fix: add 'className' and 'styleName' to prop-types (e3dac5a)
  • fix: correct global 'className' handling (20b9d9a)
  • fix(eslint): correct lib ignore path (68d7e6f)
  • fix(eslint): prevent eslint from crashing (TEMPORARY) (8d049fc)
  • fix(flow): use '' correctly (74b2256)
  • refactor: make 'DummyComponent' more similar to 'FlagIcon' (11b5ae1)
  • refactor: remove dependency on 'react-css-modules' (c51ecf6)
  • refactor: remove unused 'objectKeysApplyFn' and move 'diffArrays' (fef095c)
  • refactor(test): move static data to 'static' folder (b9037a7)
  • test: add new tests, 'snapshot tests', 'react-test-renderer' (945e7b7)
  • test: test that "import React from 'react'" works (fa8d61e)
  • test: update ava snapshots .snap (dfd1e5d)
  • test: upgrade ava to v.0.2.0, refactor and add new tests (9cbfa17)
  • test(flow): refactors and add 'FlagIconOptionsType' and 'loops' tests (975cddb)
  • Release 1.0.19 (875782a)
  • update eslint-config-airbnb to version 16.1.0 (65e8870)

1.0.19 (2017-07-02)

  • docs(github): add 'css-loader' request (fdd3cbe)
  • docs(README): add 'className' and 'styleName' to props (ae27154)
  • docs(README): fix named import (1d15ca4)
  • docs(README): replace '' with backtick, misc updates (0540064)
  • test: add new tests, 'snapshot tests', 'react-test-renderer' (945e7b7)
  • test: update ava snapshots .snap (19fe4f1)
  • test: upgrade ava to v.0.2.0, refactor and add new tests (16390b2)
  • chore: remove 'jsdom' as it is unused atm (b32b7ba)
  • chore(package): add 'package-lock.json' and regenerate lock files (f854fb6)
  • chore(package): bump 'chalk', 'eslint-plugin-jsx-a11y', fix 'jsdom' version (9b77371)
  • chore(package): run finepack (114dbc0)
  • chore(package): update nyc to version 11.0.1 (2fbbee6)
  • chore(package): upgrade cross-env to version 5.0.1 (b210795)
  • chore(package): upgrade flow-bin to version 0.49.1 (95104f3)
  • chore(package): upgrade prettier to version 1.4.2 (71822d0)
  • chore(package): upgrade prettier to version 1.4.4 (b618a19)
  • chore(test): move functions used by tests to 'internals' (52004bd)
  • chore(travis): add Node.js 8 (b71d5a6)
  • refactor: remove dependency on 'react-css-modules' (c51ecf6)
  • refactor: remove unused 'objectKeysApplyFn' and move 'diffArrays' (67910cc)
  • refactor(test): move static data to 'static' folder (b9037a7)
  • fix: add 'className' and 'styleName' to prop-types (e3dac5a)
  • fix: correct global 'className' handling (3123449)

1.0.18 (2017-05-26)

  • chore(package): upgrade flow-bin to version 0.47.0 (7f1d0db)
  • docs: small fixes (94e8e0a)

1.0.17 (2017-05-23)

  • fix: move 'static' in 'src', so that it is handled by babel (379fb18)
  • chore(package): update postcss-each to version 0.10.0 (0423e8a)
  • docs(README): add 'create-react-app' section (637e2de)
  • docs(README): add Flow configuration section (cc8b076)
  • docs(README): fix version (ae6e199)

1.0.16 (2017-05-17)

  • fix(npm): npmignore 'scripts' (aeed5b0)

1.0.15 (2017-05-17)

  • docs(README): bump version (d3811a0)
  • fix(package): fix ignore regex for tests (bce7561)

1.0.14 (2017-05-17)

  • docs(README): add custom flags docs and example (838010e)
  • docs(README): general improvements (10f0527)
  • docs(README): link to specific line (4ce7e3b)
  • chore: add nsp (Node Security CLI) (ab76d8d)
  • chore: add prettier (a9ea58b)
  • chore: yarn lock (07af05f)
  • chore(flow): remove unused entries (fea1a56)
  • chore(flow): rename FlagIconSizesType to FlagIconSizeType (02aecdf)
  • chore(flow): run 'flow-typed install' (a72e04e)
  • chore(package): update cross-env to version 5.0.0 (4de2a6e)
  • chore(package): update eslint-config-airbnb to version 15.0.0 (d1d78d3)
  • chore(package): update eslint-plugin-jsx-a11y to version 5.0.2 (a130cef)
  • chore(package): update flow-bin to version 0.45.0 (0f4cd81)
  • chore(package): update postcss-cli to version 4.0.0 (#37) (71ae62c)
  • chore(package): update postcss-custom-properties to version 6.0.0 (a1c064c)
  • chore(package): update prettier to version 1.2.2 (8a80c09)
  • chore(package): upgrade eslint-plugin-react eslint-plugin-jsx-a11y (849b1ff)
  • chore(package): upgrade flow-bin to version 0.46.0 (c85646c)
  • chore(package): upgrade prettier, eslint-plugin-react (f8c3127)
  • fix: add test for invalid code prop (29fe515)
  • fix: make baseThemeStyleName not required (baf74ea)
  • fix(flow): add suppress_comment (03e0457)
  • fix(flow): remove unused type (fab48b7)
  • fix(test): correct background-image path (dc593c4)
  • test: add tests for custom flags and 'Flow' (c0f53f7)
  • feat: typechecked custom flags with 'customCodes', 'themeStyles' (7e7301c)
  • feat(scripts): add optional third parameter to prettier task (ff12459)
  • refactor(flow): fix 'FlagIconCodeType', make it poly, generate types from enums (2f55a5e)

1.0.13 (2017-04-26)

  • test: add tests for types/propTypes (b0f07a7)
  • refactor: migrate from tcomb & tcomb-react to prop-types (f8b6758)
  • chore(package): bump enzyme, flow-bin, tcomb (3459e45)
  • chore(package): remove tape (unused) (450855e)
  • chore(package): update eslint-plugin-flowtype to 2.32.1 (bb32323)
  • fix(flow): make FlagIconOptionsType exact (7e30bb1)

1.0.12 (2017-04-10)

  • chore(package): restore react 15 and yarn upgrade (a0f157c)
  • chore(package): update ava to version 0.19.0 (c738e2e)
  • chore(package): update codecov to version 2.0.1 (c18519c)
  • chore(package): update eslint-plugin-flowtype to version 2.30.4 (d7c19e2)
  • chore(package): update flow-bin to version 0.42.0 (bfed14b)
  • chore(package): update flow-bin to version 0.43.1 (e4a706b)
  • chore(package): update postcss-at-rules-variables to version 0.1.0 (01d54f6)
  • chore(package): update postcss-cli to version 3.1.1 (734948a)
  • chore(travis): drop Node.js 5 (unmantained) (90d2138)

1.0.11 (2017-03-12)

  • fix: restore npm publish and fix sortOptions (f8bb1a1)
  • chore: add 'coveralls' and coverage badges (9e9922c)
  • chore: add codecov.io, integrate it with travis (119a1a2)
  • chore: restore .bumpedrc, replace npm -> yarn in it (89e6ff1)
  • chore: upgrade flow-bin to 0.41.0 (f1586e9)
  • chore(eslint): add trailing commas - 'comma-dangle' rule (8cd7ebe)
  • chore(eslint): simplify config with 'extends', remove deprecated rules (f4f1609)
  • chore(package): add cross-env (5e6d4f2)
  • chore(package): revert eslint-plugin-flowtype to 2.30.0 (cf7a71b)
  • chore(package): update eslint-plugin-flowtype to version 2.30.3 (8dd0851)
  • chore(tests): replace 'tape' with 'ava', add 'istanbul' via 'nyc' (c4b096e)
  • docs(github): add ISSUE_TEMPLATE inside '.github', fix broken links (c3af213)
  • docs(README): add npm version badge (f1846a1)
  • docs(README): improve content and style (5386fa8)

1.0.10 (2017-02-24)

  • fix: upgrade react and add requestAnimationFrame polyfill (467e618)
  • chore: bump flow-bin and adjust tcomb semver (69ae5db)

1.0.9 (2017-02-23)

  • fix: add file to flow type checking (f579a37)
  • fix: correct function's Flow return type (298ff50)
  • fix: flow v0.39.0 compatibility and lint (b328d2a)
  • fix: temporarily disable finepack to stop sorting 'stylelint' (e89e103)
  • lint package.json (76402e3)
  • Migrate SASS to PostCSS and publish CSS instead of SASS (9e9f20f), closes #4
  • refactor/doc: use the react css modules decorator only when needed, add comments (f29695c)
  • chore: (slightly) improve code readability (e5fd383)
  • chore: add 'testing' BABEL_ENV and babel-polyfill for tests (19eae3b)
  • chore: add build:watch and linting for .eslintrc.js (4a7ec31)
  • chore: add lots of badges (1caa559)
  • chore: add yarn-error.log to .gitignore (9d1df8e)
  • chore: add yarn.lock to .npmignore (aca6fbb)
  • chore: bump dependencies (ceb9cca)
  • chore: bump dependencies (c4a522f)
  • chore: do not publish GetFlagIconModuleCountryCodes (f06909d)
  • chore: remove unused .scss-lint.yml (afd4a4c)
  • chore: remove unused configuration (8d759e1)
  • chore: yarn upgrade (91f7e26)
  • docs: embed travis-ci status image (e0a3612)
  • docs: misc fixes (7df9f65)
  • test: add Travis CI (d000186)
  • feat: add ES2015/ES6 modules distribution in './module' folder (e68e2f9)
  • feat: print console message if no json-loader (9067cfa)
  • refactor: reduce console output of FlagIcon props test (0685c92)

1.0.7 (2017-01-02)

  • chore: remove unused duplicate country codes file (8acd57b)
  • chore: replace .eslintrc with .eslintrc.js (98a455c)
  • chore: run yarn upgrade 'modulename' (1d886e8)
  • chore: yarn upgrade (67c5b3d)
  • fix: fixes #2. add eu, un, gb-eng, gb-nir, gb-sct, gb-wls flags (8f479e6), closes #2
  • fix: make country codes more automated and tested (7ad2177)
  • style: fix eslint errors and misc fixes (058d32a)
  • feat: add yarn https://yarnpkg.com/ (d6d4d5f)
  • docs: fix broken link (c7f057d)

1.0.6 (2016-10-10)

  • fix(package.json): add required babel-cli (d31d2d8)

1.0.5 (2016-10-06)

  • fix(flow): fix FlagIcon and FlagIconFactory annotations (296940e)
  • docs(README): update and add new sections (63ecce5)

1.0.4 (2016-10-05)

  • docs(README): more updates (0405d49)

1.0.3 (2016-10-05)

  • docs(readme): add link to example project (1e9921c)
  • docs(README): misc fixes and updates (2054846)

1.0.2 (2016-10-04)

  • fix(flow-copy-source): do not copy tests to lib (e5adc74)

1.0.1 (2016-10-04)

  • chore(.babelrc): add transform-export-extensions (fc56502)
  • chore(.flowconfig): add esproposal.export_star_as and [ignore] (92ea3e5)
  • chore(bumped): add .bumpedrc (a854699)
  • chore(bumped): make bumped run prepublish (4d12901)
  • chore(FlagIcon): remove unneeded eslint-disable-line (e74bf80)
  • chore(FlagIconFactory): import functions above types (af3253f)
  • chore(package.json): add new devDependencies (968360c)
  • chore(package.json): update postbuild and sass scripts (0a70013)
  • chore(README): make some additions (a0f5997)
  • chore(src): adjust the imports to the new structure (c128dbd)
  • chore(src): delete files before move to new directory (ae58a29)
  • chore(test): replace transform with opacity (ca87981)
  • chore(travis): remove from master until tested (c5a5eb9)
  • refactor(src): move files, misc fixes, refactor and better organize the exports (09d998c)
  • refactor(test): refactor and improve props test (58f747d)
  • test(FlagIcon): add test for makeClassesObject (beb6ea8)
  • fix(test): adjust the imports to the new structure (da76e4b)
  • fix(test): replace ReactType with React (8c22863)
  • fix(types): fix incorrect declarations and add missing values (cd75fdc)
  • first commit (88a977c)