1.0.3 • Published 4 years ago
flags-react v1.0.3
#The World Flag Icons for React
A collection of all country flags in SVG --- plus the CSS for easier integration. (1:1 & 4:3 ratios)
Forked from https://github.com/lipis/flag-icon-css
Installation
npm install flags-react
##Usage
import Flag from 'flags-react'
function App(){
return (
<div>
<Flag iso="US"/>
<Flag iso="us" squared />
<Flag code="us" />
<span className='flag-icon flag-icon-us'></span>
</div>
)
}
You could also apply this to any element, but in that case you'll have to use the
flag-icon-background
className instead of flag-icon
and you're set.