Update React phone number input (#41898)

* Extends Input props

* Add author

* Fix typescript issue
This commit is contained in:
Adrien Etienne
2020-01-28 09:53:49 -08:00
committed by Wesley Wigham
parent 3c6058dac4
commit 31011673ab
2 changed files with 5 additions and 3 deletions
+4 -3
View File
@@ -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>