1- import React from ' react' ;
2- import { motion } from ' framer-motion' ;
3- import { ArrowUpRight , Clock } from ' lucide-react' ;
4- import { useColorMode } from ' @docusaurus/theme-common' ;
1+ import React from " react" ;
2+ import { motion } from " framer-motion" ;
3+ import { ArrowUpRight , Clock } from " lucide-react" ;
4+ import { useColorMode } from " @docusaurus/theme-common" ;
55
66interface TopMateCardProps {
77 title : string ;
88 description : string ;
99 duration : string ;
1010 profileImage : string ;
1111 username : string ;
12+ setShowTopmate : ( value : boolean ) => void ;
1213}
1314
1415const TopMateCard : React . FC < TopMateCardProps > = ( {
@@ -17,17 +18,18 @@ const TopMateCard: React.FC<TopMateCardProps> = ({
1718 duration,
1819 profileImage,
1920 username,
21+ setShowTopmate,
2022} ) => {
2123 const { colorMode } = useColorMode ( ) ;
22- const isDark = colorMode === ' dark' ;
24+ const isDark = colorMode === " dark" ;
2325
2426 return (
2527 < motion . div
2628 initial = { { opacity : 0 , y : 20 } }
2729 animate = { { opacity : 1 , y : 0 } }
2830 transition = { { duration : 0.5 } }
2931 className = { `relative w-full max-w-md mx-auto rounded-3xl shadow-2xl overflow-hidden hover:shadow-3xl transition-all duration-300 transform hover:-translate-y-1 ${
30- isDark ? ' bg-[#1a1a1a] text-white' : ' bg-white text-black'
32+ isDark ? " bg-[#1a1a1a] text-white" : " bg-white text-black"
3133 } `}
3234 >
3335 { /* Decorative Arrows */ }
@@ -50,28 +52,47 @@ const TopMateCard: React.FC<TopMateCardProps> = ({
5052 { /* Header */ }
5153 < div className = "flex items-center justify-between mb-4" >
5254 < div className = "flex items-center gap-2" >
53- < span className = { `text-sm font-medium ${ isDark ? 'text-gray-300' : 'text-gray-600' } ` } >
55+ < span
56+ className = { `text-sm font-medium ${
57+ isDark ? "text-gray-300" : "text-gray-600"
58+ } `}
59+ >
5460 1:1 CALL
5561 </ span >
56- < div className = { `flex items-center gap-1 ${ isDark ? 'text-gray-400' : 'text-gray-500' } ` } >
62+ < div
63+ className = { `flex items-center gap-1 ${
64+ isDark ? "text-gray-400" : "text-gray-500"
65+ } `}
66+ >
5767 < Clock size = { 16 } />
5868 < span className = "text-sm" > { duration } </ span >
5969 </ div >
6070 </ div >
6171 < button
62- className = { `text-xl font-semibold ${ isDark ? 'text-gray-500 hover:text-gray-300' : 'text-gray-400 hover:text-gray-600' } ` }
72+ className = { `text-xl font-semibold ${
73+ isDark
74+ ? "text-gray-500 hover:text-gray-300"
75+ : "text-gray-400 hover:text-gray-600"
76+ } `}
77+ onClick = { ( ) => setShowTopmate ( false ) }
6378 >
6479 < span className = "sr-only" > Close</ span > ×
6580 </ button >
6681 </ div >
6782
6883 { /* Title */ }
69- < h2 className = { `text-2xl font-bold mb-4 ${ isDark ? 'text-white' : 'text-gray-900' } ` } >
84+ < h2
85+ className = { `text-2xl font-bold mb-4 ${
86+ isDark ? "text-white" : "text-gray-900"
87+ } `}
88+ >
7089 { title }
7190 </ h2 >
7291
7392 { /* Description */ }
74- < p className = { `${ isDark ? 'text-gray-300' : 'text-gray-600' } mb-6` } > { description } </ p >
93+ < p className = { `${ isDark ? "text-gray-300" : "text-gray-600" } mb-6` } >
94+ { description }
95+ </ p >
7596
7697 { /* Profile Section */ }
7798 < div className = "flex items-center justify-between flex-wrap md:flex-nowrap gap-y-3" >
@@ -82,7 +103,11 @@ const TopMateCard: React.FC<TopMateCardProps> = ({
82103 className = "w-12 h-12 rounded-full object-cover border-2 border-purple-200"
83104 />
84105 < div className = "flex flex-col" >
85- < span className = { `text-sm ${ isDark ? 'text-gray-300' : 'text-gray-600' } ` } >
106+ < span
107+ className = { `text-sm ${
108+ isDark ? "text-gray-300" : "text-gray-600"
109+ } `}
110+ >
86111 Book a slot at
87112 </ span >
88113 < a
@@ -106,7 +131,13 @@ const TopMateCard: React.FC<TopMateCardProps> = ({
106131 />
107132 </ div >
108133 { /* Theme-aware text to ensure readability on dark backgrounds */ }
109- < span className = { `text-sm font-semibold shrink-0 ${ isDark ? 'text-gray-200' : 'text-gray-700' } ` } > topmate</ span >
134+ < span
135+ className = { `text-sm font-semibold shrink-0 ${
136+ isDark ? "text-gray-200" : "text-gray-700"
137+ } `}
138+ >
139+ topmate
140+ </ span >
110141 </ div >
111142 </ div >
112143 </ div >
0 commit comments