From f6667c940b6925e94d05d3b9c7be82ddda21bec3 Mon Sep 17 00:00:00 2001 From: Artyom Vancyan Date: Tue, 28 Feb 2023 12:17:22 +0400 Subject: [PATCH] Rename the default component name --- src/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 881b0a5..14f04e7 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,5 +1,5 @@ import {ChangeEvent, useMemo, useState} from "react"; -import PhoneInput from "react-phone-input-2"; +import ReactPhoneInput from "react-phone-input-2"; import masks from "./phoneMasks.json"; import timezones from "./timezones.json"; @@ -37,7 +37,7 @@ const getDefaultISO2Code = () => { return timezones[timezone].toLowerCase() || "us"; } -const PhoneNumberInput = ({value = {}, onChange: handleChange}: PhoneNumberInputProps) => { +const PhoneInput = ({value = {}, onChange: handleChange}: PhoneNumberInputProps) => { const [currentCode, setCurrentCode] = useState(""); const rawPhone = useMemo(() => Object.values(value).map(v => v || "").join(""), [value]); @@ -70,7 +70,7 @@ const PhoneNumberInput = ({value = {}, onChange: handleChange}: PhoneNumberInput }; return ( -