diff --git a/src/components/sections/testimonial/TestimonialCardOne.tsx b/src/components/sections/testimonial/TestimonialCardOne.tsx index 99940b8..35e398b 100644 --- a/src/components/sections/testimonial/TestimonialCardOne.tsx +++ b/src/components/sections/testimonial/TestimonialCardOne.tsx @@ -8,6 +8,82 @@ import { Star } from "lucide-react"; import type { LucideIcon } from "lucide-react"; import type { ButtonConfig, ButtonAnimationType, CardAnimationTypeWith3D, GridVariant, TitleSegment, TextboxLayout, InvertedBackground } from "@/components/cardStack/types"; +const TestimonialCardFlip = memo(({ testimonial, className }: { testimonial: Testimonial; className?: string }) => { + const [isFlipped, setIsFlipped] = useState(false); + + return ( +
setIsFlipped(!isFlipped)} + onMouseEnter={() => setIsFlipped(true)} + onMouseLeave={() => setIsFlipped(false)} + style={{ + perspective: "1000px", + }} + > +
+ {/* Front side - Name and Photo */} +
+ {testimonial.imageSrc && ( + {testimonial.imageAlt + )} +

+ {testimonial.name} +

+

+ {testimonial.role} +

+

+ {testimonial.company} +

+
+ {Array.from({ length: testimonial.rating }).map((_, i) => ( + + ))} +
+
+ + {/* Back side - Testimonial Text */} +
+

+ "{testimonial.testimonialText || "No testimonial text provided"}" +

+
+
+
+ ); +}); + +TestimonialCardFlip.displayName = "TestimonialCardFlip"; + type Testimonial = { id: string; name: string;