From 31011673ab7c14aa5539558a99faa5fa2e673480 Mon Sep 17 00:00:00 2001 From: Adrien Etienne Date: Wed, 29 Jan 2020 06:53:49 +1300 Subject: [PATCH] Update React phone number input (#41898) * Extends Input props * Add author * Fix typescript issue --- types/react-phone-number-input/index.d.ts | 7 ++++--- .../react-phone-number-input-tests.tsx | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/types/react-phone-number-input/index.d.ts b/types/react-phone-number-input/index.d.ts index 41e96d2c03..6fc5296557 100644 --- a/types/react-phone-number-input/index.d.ts +++ b/types/react-phone-number-input/index.d.ts @@ -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 -// Adrien Etienne +// Adrien Etienne +// Jonathan Fleckenstein // 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, "onChange" | "id"> { // Required props onChange: (value: string) => void; value: string; diff --git a/types/react-phone-number-input/react-phone-number-input-tests.tsx b/types/react-phone-number-input/react-phone-number-input-tests.tsx index 942d2cbd2c..edbe569aa0 100644 --- a/types/react-phone-number-input/react-phone-number-input-tests.tsx +++ b/types/react-phone-number-input/react-phone-number-input-tests.tsx @@ -12,6 +12,7 @@ const test1 = ( autoComplete="tel" defaultCountry="NZ" countries={["NZ", "US", "FR"]} + placeholder="Place holder" >
panel 1
panel 2