turkmentv_front/components/lottery/winners/LotteryWinner.tsx

35 lines
1.0 KiB
TypeScript
Raw Normal View History

2024-12-29 18:02:23 +00:00
"use client";
2024-11-25 14:33:01 +00:00
2024-12-29 18:02:23 +00:00
import { motion } from "framer-motion";
2024-11-25 14:33:01 +00:00
interface IProps {
2024-12-25 13:46:20 +00:00
phone: string;
ticket: string;
2024-12-27 15:23:39 +00:00
isNew: boolean;
2024-12-27 16:20:13 +00:00
winnerNumber: number;
2024-11-25 14:33:01 +00:00
}
2024-12-27 16:20:13 +00:00
const LotteryWinner = ({ phone, ticket, isNew, winnerNumber }: IProps) => {
2024-11-25 14:33:01 +00:00
return (
<motion.div
2024-12-27 15:23:39 +00:00
layout
initial={isNew ? { opacity: 0, translateY: 20 } : false}
animate={{ opacity: 1, translateY: 0 }}
exit={{ opacity: 0, translateY: -20 }}
transition={{ duration: 0.5 }}
2024-12-29 18:02:23 +00:00
className="flex flex-col gap-2 md:pb-4 pb-3 border-b w-full border-[#CECCFF]"
>
2024-12-25 13:46:20 +00:00
<h4 className="md:font-heading-6-regular text-[20px] leading-[28px]">
2024-12-27 16:20:13 +00:00
The winner of the {winnerNumber} stage:
2024-12-13 11:37:37 +00:00
</h4>
2024-12-25 13:46:20 +00:00
<div className="flex items-center gap-4">
2024-12-29 18:02:23 +00:00
<p className="md:font-base-medium font-base-regular">{phone}</p>
2024-12-25 13:46:20 +00:00
<div className="w-1 h-1 rounded-full bg-lightOnSurfaceVariant"></div>
2024-12-29 18:02:23 +00:00
<p className="md:font-base-medium font-base-regular">{ticket}</p>
2024-12-25 13:46:20 +00:00
</div>
2024-11-25 14:33:01 +00:00
</motion.div>
);
};
export default LotteryWinner;