@comicrelief/country-lists
v1.0.0
Published
Lists of countries for our frontend components
Downloads
1
Maintainers
Keywords
Readme
Country lists
A small module that exports country lists used by Comic Relief's frontend components. Country data comes from country-list
.
Usage
Install using npm or yarn:
npm i @comicrelief/country-lists
# or
yarn add @comicrelief/country-lists
Each list includes:
getNames()
: returns the plain names of the countriesgetSelectItems()
: returns{ value, displayValue }
objects for our current<Select>
componentgetLegacySelectItems()
: returns{ value, label }
objects for our legacy components
Lists
ALL_COUNTRIES
Includes every country as provided by country-list
.
UK_AND_CHANNEL_ISLES
Includes the United Kingdom and its Crown Dependencies: the Isle of Man, Jersey, and Guernsey.