diff --git a/index.d.ts b/index.d.ts index dd2ce8b..50b8c10 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,6 +1,12 @@ import { TextFieldProps } from "@mui/material"; import * as React from "react"; +type CountryData = { + name?: string + dialCode?: string + countryCode?: string +} + export type MuiPhoneNumberProps = TextFieldProps & { autoFormat?: boolean; classes?: any; @@ -13,9 +19,7 @@ export type MuiPhoneNumberProps = TextFieldProps & { enableLongNumbers?: boolean; excludeCountries?: string[]; inputClass?: string; - onChange: ( - e: React.ChangeEvent | string - ) => void; + onChange: (value: string, countryData: CountryData) => void; onlyCountries?: string[]; preferredCountries?: string[]; regions?: [string] | string;