calcom/components/ui/form/PhoneInput.tsx
Omar López cfd70172f0
Refactors useLocale (#908)
* Removes unused component

* Refactors useLocale

We don't need to pass the locale prop everywhere

* Fixes syntax error

* Adds warning for missing localeProps

* Simplify i18n utils

* Update components/I18nLanguageHandler.tsx

Co-authored-by: Mihai C <34626017+mihaic195@users.noreply.github.com>

* Type fixes

Co-authored-by: Mihai C <34626017+mihaic195@users.noreply.github.com>
2021-10-12 13:11:33 +00:00

20 lines
700 B
TypeScript

import React from "react";
import { default as BasePhoneInput } from "react-phone-number-input";
import "react-phone-number-input/style.css";
import classNames from "@lib/classNames";
export const PhoneInput = (props: any /* FIXME */) => (
<BasePhoneInput
{...props}
className={classNames(
"shadow-sm rounded-md block w-full py-px px-3 border border-1 border-gray-300 ring-black focus-within:ring-1 focus-within:border-black dark:border-gray-900 dark:text-white dark:bg-black",
props.className
)}
onChange={() => {
/* DO NOT REMOVE: Callback required by PhoneInput, comment added to satisfy eslint:no-empty-function */
}}
/>
);
export default PhoneInput;