Beautiful flag icons for usage in React webapps. All flags are provided as importable images by React.
npm install --save react-flagkit
<Flag country="US" />
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 |
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
ornpm run test:watch
for constant feedback - Visual regression testing
npm run styleguide
ornpm run styleguide:build
to build./docs
- Code linting
npm run lint
runs to check your code for syntax issues.