Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,16 @@ npm install react-world-flags
```javascript
import Flag from 'react-world-flags'

;<Flag code={code} />
<Flag code={code} />
```

Where `code` is the [two letter](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), [three letter](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) or [three digit](https://en.wikipedia.org/wiki/ISO_3166-1_numeric) country code.

You can also pass an optional `fallback` which renders if the given code doesn't correspond to a flag:

```javascript
import Flag from 'react-world-flags'

;<Flag code="foo" fallback={<span>Unknown</span>} />
import Flag from 'react-world-flags';
<Flag code="foo" fallback={<span>Unknown</span>} />
```

All props but `code` and `fallback` are passed through to the rendered `img`
Expand Down