UNPKG

intl-tel-input

Version:

A JavaScript plugin for entering and validating international telephone numbers

21 lines (20 loc) 845 B
import intlTelInput, { Iti } from "intl-tel-input"; import React from "react"; export { intlTelInput }; type InputProps = Omit<React.ComponentPropsWithoutRef<"input">, "onInput">; export type IntlTelInputRef = { getInstance: () => Iti | null; getInput: () => HTMLInputElement | null; }; declare const IntlTelInput: React.ForwardRefExoticComponent<Partial<import("intl-tel-input").AllOptions> & { onChangeNumber?: (number: string) => void; onChangeCountry?: (country: string) => void; onChangeValidity?: (valid: boolean) => void; onChangeErrorCode?: (errorCode: number | null) => void; usePreciseValidation?: boolean; inputProps?: InputProps; disabled?: boolean | undefined; readOnly?: boolean | undefined; value?: string | null; } & React.RefAttributes<IntlTelInputRef>>; export default IntlTelInput;