Skip to content

Commit

Permalink
Adding support for multiple new countries
Browse files Browse the repository at this point in the history
  • Loading branch information
tnovau committed May 5, 2022
1 parent 68a579a commit b4b4e62
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 17 deletions.
17 changes: 16 additions & 1 deletion docs/src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ const countryMap = {
cl: 'Chile',
cm: 'Cameroon',
cn: 'China',
'cn-xj': 'Xinjiang',
co: 'Colombia',
cr: 'Costa Rica',
cu: 'Cuba',
Expand All @@ -90,6 +91,8 @@ const countryMap = {
dm: 'Dominica',
do: 'Dominican Republic',
dz: 'Algeria',
earth: 'Earth',
east_african_federation: 'East African Federation',
easter_island: 'Easter Island',
'ec-w': 'Galápagos',
ec: 'Ecuador',
Expand All @@ -99,6 +102,7 @@ const countryMap = {
er: 'Eritrea',
'es-ce': 'Ceuta',
'es-cn': 'Canary Islands',
'es-ct': 'Catalonia',
'es-ga': 'Galicia',
'es-ib': 'Balearic Islands',
'es-ml': 'Melilla',
Expand All @@ -121,7 +125,7 @@ const countryMap = {
'gb-wls': 'Wales',
gb: 'United Kingdom',
gd: 'Grenada',
'ge-ab': 'Georgia',
'ge-ab': 'Abkhazia',
ge: 'French Guiana',
gg: 'Guernsey',
gh: 'Ghana',
Expand All @@ -146,10 +150,15 @@ const countryMap = {
ht: 'Haiti',
hu: 'Hungary',
id: 'Indonesia',
'id-jb': 'West Java',
'id-jt': 'Central Java',
ie: 'Ireland',
il: 'Israel',
im: 'Isle of Man',
in: 'India',
'in-gj': 'Gujarat',
'in-or': 'Odisha',
'in-tn': 'Tamil Nadu',
io: 'British Indian Ocean Territory',
iq: 'Iraq',
ir: 'Iran',
Expand Down Expand Up @@ -218,12 +227,14 @@ const countryMap = {
ng: 'Nigeria',
ni: 'Nicaragua',
nl: 'Netherlands',
'nl-fr': 'Friesland',
no: 'Norway',
northern_cyprus: 'Northern Cyprus',
np: 'Nepal',
nr: 'Nauru',
nu: 'Niue',
nz: 'New Zealand',
olympics: 'Olympics',
om: 'Oman',
pa: 'Panama',
pe: 'Peru',
Expand All @@ -246,6 +257,7 @@ const countryMap = {
ro: 'Romania',
rs: 'Serbia',
ru: 'Russia',
'ru-ta': 'Tatarstan',
rw: 'Rwanda',
sa: 'Saudi Arabia',
sb: 'Solomon Islands',
Expand All @@ -258,6 +270,7 @@ const countryMap = {
'sh-ta': 'Tristan da Cunha',
si: 'Slovenia',
sindh: 'Svalbard and Jan Mayen',
sj: 'Svalbard and Jan Mayen',
sk: 'Slovakia',
sl: 'Sierra Leone',
sm: 'San Marino',
Expand All @@ -268,6 +281,7 @@ const countryMap = {
sr: 'Suriname',
ss: 'South Sudan',
st: 'São Tomé and Príncipe',
su: 'Soviet Union',
sv: 'El Salvador',
sx: 'Sint Maarten',
sy: 'Syria',
Expand All @@ -284,6 +298,7 @@ const countryMap = {
tm: 'Turkmenistan',
tn: 'Tunisia',
to: 'Tonga',
torres_strait_islands: 'Torres Strait Islands',
tr: 'Turkey',
transnistria: 'Transnistria',
tt: 'Trinidad and Tobago',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-circle-flags",
"version": "0.0.16",
"version": "0.0.17",
"description": "A React component with a collection of 300+ minimal circular SVG country flags",
"author": "Tomás Novau([email protected])",
"license": "MIT",
Expand Down
46 changes: 31 additions & 15 deletions src/countries.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
al: true,
am: true,
ao: true,
aq: false,
aq: true,
ar: true,
as: true,
at: true,
Expand Down Expand Up @@ -35,6 +35,7 @@ export default {
bs: true,
bt: true,
xx: true,
bv: true,
bw: true,
by: true,
bz: true,
Expand All @@ -50,6 +51,7 @@ export default {
cl: true,
cm: true,
cn: true,
'cn-xj': true,
co: true,
cr: true,
cu: true,
Expand All @@ -64,6 +66,8 @@ export default {
dm: true,
do: true,
dz: true,
earth: true,
east_african_federation: true,
easter_island: true,
'ec-w': true,
ec: true,
Expand All @@ -73,6 +77,7 @@ export default {
er: true,
'es-ce': true,
'es-cn': true,
'es-ct': true,
'es-ga': true,
'es-ib': true,
'es-ml': true,
Expand Down Expand Up @@ -103,27 +108,32 @@ export default {
gl: true,
gm: true,
gn: true,
gp: false,
gp: true,
gq: true,
gr: true,
gs: false,
gs: true,
gt: true,
gu: true,
gw: true,
gy: true,
hausa: true,
hk: true,
hmong: true,
hm: false,
hm: true,
hn: true,
hr: true,
ht: true,
hu: true,
id: true,
'id-jb': true,
'id-jt': true,
ie: true,
il: true,
im: true,
in: true,
'in-gj': true,
'in-or': true,
'in-tn': true,
io: true,
iq: true,
ir: true,
Expand Down Expand Up @@ -165,7 +175,7 @@ export default {
mc: true,
md: true,
me: true,
mf: false,
mf: true,
mg: true,
mh: true,
mk: true,
Expand All @@ -185,19 +195,21 @@ export default {
my: true,
mz: true,
na: true,
nc: false,
nc: true,
nato: true,
ne: true,
nf: true,
ng: true,
ni: true,
nl: true,
'nl-fr': true,
no: true,
northern_cyprus: true,
np: true,
nr: true,
nu: true,
nz: true,
olympics: true,
om: true,
pa: true,
pe: true,
Expand All @@ -206,7 +218,7 @@ export default {
ph: true,
pk: true,
pl: true,
pm: false,
pm: true,
pn: true,
pr: true,
ps: true,
Expand All @@ -216,22 +228,24 @@ export default {
pw: true,
py: true,
qa: true,
re: false,
re: true,
ro: true,
rs: true,
ru: true,
'ru-ta': true,
rw: true,
sa: true,
sb: true,
sc: true,
sd: true,
se: true,
sg: true,
'sh-hl': false,
'sh-ac': false,
'sh-ta': false,
'sh-hl': true,
'sh-ac': true,
'sh-ta': true,
si: true,
sindh: true,
sj: true,
sk: true,
sl: true,
sm: true,
Expand All @@ -242,13 +256,14 @@ export default {
sr: true,
ss: true,
st: true,
su: true,
sv: true,
sx: true,
sy: true,
sz: true,
tc: true,
td: true,
tf: false,
tf: true,
tg: true,
th: true,
tibet: true,
Expand All @@ -258,6 +273,7 @@ export default {
tm: true,
tn: true,
to: true,
torres_strait_islands: true,
tr: true,
transnistria: true,
tt: true,
Expand All @@ -267,7 +283,7 @@ export default {
ua: true,
ug: true,
united_nations: true,
um: false,
um: true,
'us-hi': true,
us: true,
uy: true,
Expand All @@ -279,12 +295,12 @@ export default {
vi: true,
vn: true,
vu: true,
wf: false,
wf: true,
ws: true,
xk: true,
placeholder: false,
ye: true,
yt: false,
yt: true,
yiddish: true,
za: true,
zm: true,
Expand Down

0 comments on commit b4b4e62

Please sign in to comment.