forked from typesnippet/mui-phone-input
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
45 lines (25 loc) · 975 Bytes
/
types.ts
File metadata and controls
45 lines (25 loc) · 975 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
"use client";
import {ChangeEvent, KeyboardEvent} from "react";
import types from "react-phone-hooks/types";
import {TextFieldProps} from "@mui/material/TextField";
export type PhoneNumber = types.PhoneNumber;
export interface PhoneInputProps extends Omit<TextFieldProps, "onChange"> {
value?: PhoneNumber | string;
useSVG?: boolean;
searchVariant?: TextFieldProps["variant"];
country?: string;
distinct?: boolean;
enableArrow?: boolean;
enableSearch?: boolean;
searchNotFound?: string;
searchPlaceholder?: string;
disableDropdown?: boolean;
disableParentheses?: boolean;
onlyCountries?: string[];
excludeCountries?: string[];
preferredCountries?: string[];
onMount?(value: PhoneNumber): void;
onInput?(event: ChangeEvent<HTMLInputElement>): void;
onKeyDown?(event: KeyboardEvent<HTMLInputElement>): void;
onChange?(value: PhoneNumber, event: ChangeEvent<HTMLInputElement>): void;
}