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
31 lines (18 loc) · 734 Bytes
/
types.ts
File metadata and controls
31 lines (18 loc) · 734 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
"use client";
import {ChangeEvent, KeyboardEvent} from "react";
import types from "react-phone-hooks/types";
import {InputProps} from "@mui/base/Input";
export type PhoneNumber = types.PhoneNumber;
export interface PhoneInputProps extends Omit<InputProps, "onChange"> {
value?: PhoneNumber | string;
useSVG?: boolean;
country?: string;
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;
}