Hoppa till innehåll

CountryCodeSelect

Terminal window
npm install @sk-web-gui/react
import { CountryCodeSelect } from '@sk-web-gui/react';
PropTypStandardBeskrivning
onChangeCountryCode(value: number | undefined) => voidReturns the country code as a number (e.g 46). onChange will hold the selected country’s 2 digit ISO code (e.g SE). This is important to differentiate between countries with the same country code (e.g 1 for US and CA).
onChange(event: React.ChangeEvent<HTMLSelectElement>) => voidThe event value holds the selected country’s 2 digit ISO code (e.g SE) followed by a + and the country code Resulting in a string like “SE+46”
valuestringThe selected country’s 2 digit ISO code (e.g SE)
placeholderstringText displayed when no country is selected
countriesstring[]Countries to be displayed in the select dropdown as an array of 2 digit ISO codes, e.g [SE, NO, FI] @default all countries
  • Template – standardstory
  • Combobox – standardstory
  • InputWithSelect – standardstory
  • InputWithCombobox – standardstory