calcom/components/ui/form/PhoneInput.tsx
Peer Richelsen 51d553559f
tailwind prettier (#1646)
* tailwind prettier

* Minor fixes

* Sorts components and pages

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: zomars <zomars@me.com>
2022-02-09 00:05:13 +00:00

21 lines
779 B
TypeScript

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