brandonstill / react-flagkit

Beautiful flag icons for usage in React.js apps

Home Page:http://stephenway.net/react-flagkit/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-flagkit

Beautiful flag icons for usage in React webapps. All flags are provided as importable images by React.

Documentation

Installation

npm install --save react-flagkit

Usage

JSX Structure

<Flag country="US" />

Methods and Props

Prop name Type Default Description
country string Required The country code for the image path
role string img The a11y role type for the <img /> tag
size number 24 The size of the image

Testing

This project uses Jest & Enzyme for component unit testing and React Styleguidist for visual regression testing and documentation. Also, EsLint is used for linting code.

  • Unit testing npm run test or npm run test:watch for constant feedback
  • Visual regression testing npm run styleguide or npm run styleguide:build to build ./docs
  • Code linting npm run lint runs to check your code for syntax issues.

About

Beautiful flag icons for usage in React.js apps

http://stephenway.net/react-flagkit/

License:MIT License


Languages

Language:JavaScript 100.0%