1.0.0 • Published 2 years ago

@comicrelief/country-lists v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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 countries
  • getSelectItems(): returns { value, displayValue } objects for our current <Select> component
  • getLegacySelectItems(): 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.