vue3-country-select
Version:
A Vue 3 component for country selection with TypeScript support
43 lines (42 loc) • 1.39 kB
TypeScript
interface BaseCountry {
iso2: string;
name: string;
dialCode: string;
}
interface Country extends BaseCountry {
preferred?: boolean;
}
interface DropdownOptions {
disabledDialCode?: boolean;
}
interface Props {
disabledFetchingCountry?: boolean;
disabled?: boolean;
disabledFormatting?: boolean;
defaultCountry?: string;
enabledCountryCode?: boolean;
enabledFlags?: boolean;
preferredCountries?: string[];
onlyCountries?: string[];
ignoredCountries?: string[];
dropdownOptions?: DropdownOptions;
selectedCountryCode?: boolean;
}
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
onSelect: (country: Country) => any;
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
onOnSelect?: ((country: Country) => any) | undefined;
}>, {
disabledFetchingCountry: boolean;
disabled: boolean;
disabledFormatting: boolean;
defaultCountry: string;
enabledCountryCode: boolean;
enabledFlags: boolean;
preferredCountries: string[];
onlyCountries: string[];
ignoredCountries: string[];
dropdownOptions: DropdownOptions;
selectedCountryCode: boolean;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
export default _default;