2025-08-13 14:23:48 +01:00
|
|
|
import { GB } from "country-flag-icons/react/3x2";
|
|
|
|
|
import { formatNumberPlate } from "../../utils/utils";
|
|
|
|
|
|
|
|
|
|
type NumberPlateProps = {
|
2025-08-20 08:27:05 +01:00
|
|
|
vrm?: string | undefined;
|
|
|
|
|
motion?: boolean;
|
2025-08-13 14:23:48 +01:00
|
|
|
};
|
|
|
|
|
|
2025-08-20 08:27:05 +01:00
|
|
|
const NumberPlate = ({ motion, vrm }: NumberPlateProps) => {
|
2025-08-13 14:23:48 +01:00
|
|
|
return (
|
|
|
|
|
<div
|
2025-09-17 14:39:56 +01:00
|
|
|
className={`relative w-[16rem] border-6 border-black rounded-xl text-nowrap
|
|
|
|
|
text-black px-6 py-2
|
|
|
|
|
${motion ? "bg-yellow-400" : "bg-white"}
|
|
|
|
|
`}
|
2025-08-13 14:23:48 +01:00
|
|
|
>
|
2025-09-17 14:39:56 +01:00
|
|
|
<div>
|
|
|
|
|
<div className="absolute inset-y-0 left-0 bg-blue-600 w-8 flex flex-col">
|
2025-08-13 14:23:48 +01:00
|
|
|
<GB />
|
|
|
|
|
</div>
|
2025-09-17 14:39:56 +01:00
|
|
|
<p className="pl-4 font-extrabold text-3xl text-right">
|
2025-08-20 08:27:05 +01:00
|
|
|
{vrm && formatNumberPlate(vrm)}
|
2025-08-13 14:23:48 +01:00
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default NumberPlate;
|