mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 23:07:06 +00:00
Update React phone number input (#41898)
* Extends Input props * Add author * Fix typescript issue
This commit is contained in:
committed by
Wesley Wigham
parent
3c6058dac4
commit
31011673ab
+4
-3
@@ -1,9 +1,10 @@
|
||||
// Type definitions for react-phone-number-input 3.0
|
||||
// Project: https://github.com/AdrienEtienne/react-phone-number-input
|
||||
// Definitions by: Peter Yang <https://github.com/PeterYangIO>
|
||||
// Adrien Etienne <https://github.com/AdrienEtienne>
|
||||
// Adrien Etienne <https://github.com/AdrienEtienne>
|
||||
// Jonathan Fleckenstein <https://github.com/fleck>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// Minimum TypeScript Version: 3.0
|
||||
// Minimum TypeScript Version: 3.5
|
||||
|
||||
import * as React from "react";
|
||||
|
||||
@@ -38,7 +39,7 @@ export interface InputComponentProps {
|
||||
metadata?: object;
|
||||
}
|
||||
|
||||
export interface PhoneInputProps {
|
||||
export interface PhoneInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "id"> {
|
||||
// Required props
|
||||
onChange: (value: string) => void;
|
||||
value: string;
|
||||
|
||||
@@ -12,6 +12,7 @@ const test1 = (
|
||||
autoComplete="tel"
|
||||
defaultCountry="NZ"
|
||||
countries={["NZ", "US", "FR"]}
|
||||
placeholder="Place holder"
|
||||
>
|
||||
<div>panel 1</div>
|
||||
<div>panel 2</div>
|
||||
|
||||
Reference in New Issue
Block a user