Files
IRTH-2/client/src/components/MasterSelector.tsx
T
2024-07-26 12:59:11 +05:00

37 lines
926 B
TypeScript

import { PatternFormat } from "react-number-format";
import ChevronDownIcon from "./icons/ChevronDownIcon";
interface IOptions {
id: string;
value: string;
placeholder: string;
}
interface MasterSelectorProps {
title: string;
isError?: false;
options?: IOptions[];
}
const MasterSelector = ({ title }: MasterSelectorProps) => {
return (
<div className="">
<p className="text-[#0D192266] text-caption-m font-semibold pb-2">
{title}
</p>
<div className="bg-white rounded-lg flex px-4 py-[14px] items-center">
<div className="text-m text-[#00BED7] pr-2 border-r flex items-center gap-2">
+971 <ChevronDownIcon width="20" height="20" />
</div>
<PatternFormat
format="## #### ###"
placeholder="XX XXXX XX XX"
className="focus:outline-none pl-4"
/>
</div>
</div>
);
};
export default MasterSelector;