Skip to content

Commit

Permalink
Have regions as an array
Browse files Browse the repository at this point in the history
  • Loading branch information
tujoworker committed Dec 4, 2023
1 parent 6729a03 commit 593780a
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions packages/dnb-eufemia/src/extensions/forms/constants/countries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,18 @@ export type CountryType = {
en: string
nb: string
}
continent: string
regions?: string
continent:
| 'Asia'
| 'Europe'
| 'Africa'
| 'Oceania'
| 'Antarctica'
| 'North America'
| 'South America'
regions?: Array<'Scandinavia' | 'NorthernNordic' | 'AutonomousNordic'>
}

export default [
const countries: Array<CountryType> = [
{
i18n: {
en: 'Afghanistan',
Expand Down Expand Up @@ -528,7 +535,7 @@ export default [
cdc: '45',
iso: 'DK',
continent: 'Europe',
regions: 'Scandinavia, NorthernNordic',
regions: ['Scandinavia', 'NorthernNordic'],
},
{
i18n: {
Expand Down Expand Up @@ -655,7 +662,7 @@ export default [
cdc: '298',
iso: 'FO',
continent: 'Europe',
regions: 'AutonomousNordic',
regions: ['AutonomousNordic'],
},
{
i18n: {
Expand All @@ -674,7 +681,7 @@ export default [
cdc: '358',
iso: 'FI',
continent: 'Europe',
regions: 'NorthernNordic',
regions: ['NorthernNordic'],
},
{
i18n: {
Expand Down Expand Up @@ -774,7 +781,7 @@ export default [
cdc: '299',
iso: 'GL',
continent: 'North America',
regions: 'AutonomousNordic',
regions: ['AutonomousNordic'],
},
{
i18n: {
Expand Down Expand Up @@ -892,7 +899,7 @@ export default [
cdc: '354',
iso: 'IS',
continent: 'Europe',
regions: 'NorthernNordic',
regions: ['NorthernNordic'],
},
{
i18n: {
Expand Down Expand Up @@ -1469,7 +1476,7 @@ export default [
cdc: '47',
iso: 'NO',
continent: 'Europe',
regions: 'Scandinavia, NorthernNordic',
regions: ['Scandinavia', 'NorthernNordic'],
},
{
i18n: {
Expand Down Expand Up @@ -1920,7 +1927,7 @@ export default [
cdc: '46',
iso: 'SE',
continent: 'Europe',
regions: 'Scandinavia, NorthernNordic',
regions: ['Scandinavia', 'NorthernNordic'],
},
{
i18n: {
Expand Down Expand Up @@ -2210,4 +2217,6 @@ export default [
iso: 'ZW',
continent: 'Africa',
},
] as Array<CountryType>
]

export default countries

0 comments on commit 593780a

Please sign in to comment.