2021-12-07 15:07:21 +00:00
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
|
|
|
import { ComboboxProps } from '../combobox';
|
|
|
|
import { countries } from './stories/countries-filler';
|
|
|
|
|
|
|
|
export interface CountryInputProps extends Omit< ComboboxProps, 'options' > {
|
|
|
|
/**
|
|
|
|
* Classes to assign to the wrapper component of the input
|
|
|
|
*/
|
2021-06-17 08:35:24 +00:00
|
|
|
className?: string;
|
2021-12-07 15:07:21 +00:00
|
|
|
/**
|
|
|
|
* Whether input elements can by default have their values automatically completed by the browser.
|
|
|
|
*
|
|
|
|
* This value gets assigned to both the wrapper `Combobox` and the wrapped input element.
|
|
|
|
*/
|
2021-06-17 08:35:24 +00:00
|
|
|
autoComplete?: string;
|
|
|
|
}
|
|
|
|
|
2021-12-07 15:07:21 +00:00
|
|
|
export interface CountryInputWithCountriesProps extends CountryInputProps {
|
|
|
|
/**
|
|
|
|
* List of countries to allow in the selection
|
|
|
|
*
|
|
|
|
* Object shape should be: `{ [Alpha-2 Country Code]: 'Full country name' }`
|
|
|
|
*/
|
|
|
|
countries: Partial< typeof countries >;
|
|
|
|
}
|