diff --git a/src/components/sections/testimonial/TestimonialCardSix.tsx b/src/components/sections/testimonial/TestimonialCardSix.tsx index 440b8b4..6f6932b 100644 --- a/src/components/sections/testimonial/TestimonialCardSix.tsx +++ b/src/components/sections/testimonial/TestimonialCardSix.tsx @@ -1,29 +1,203 @@ -import React from "react"; +"use client"; + +import { memo } from "react"; import AutoCarousel from "@/components/cardStack/layouts/carousels/AutoCarousel"; +import TestimonialAuthor from "@/components/shared/TestimonialAuthor"; +import { cls, shouldUseInvertedText } from "@/lib/utils"; +import { useTheme } from "@/providers/themeProvider/ThemeProvider"; +import { Quote } from "lucide-react"; +import type { LucideIcon } from "lucide-react"; +import type { CardAnimationType, ButtonConfig, ButtonAnimationType, TitleSegment, TextboxLayout, InvertedBackground } from "@/components/cardStack/types"; + +type Testimonial = { + id: string; + name: string; + handle: string; + testimonial: string; + imageSrc?: string; + imageAlt?: string; + icon?: LucideIcon; +}; interface TestimonialCardSixProps { - testimonials?: any[]; - title?: string; - description?: string; - animationType?: string; - useInvertedBackground?: boolean; + testimonials: Testimonial[]; + animationType: CardAnimationType; + title: string; + titleSegments?: TitleSegment[]; + description: string; + textboxLayout: TextboxLayout; + useInvertedBackground: InvertedBackground; + tag?: string; + tagIcon?: LucideIcon; + tagAnimation?: ButtonAnimationType; + buttons?: ButtonConfig[]; + buttonAnimation?: ButtonAnimationType; + speed?: number; + topMarqueeDirection?: "left" | "right"; + ariaLabel?: string; + className?: string; + containerClassName?: string; + carouselClassName?: string; + bottomCarouselClassName?: string; + cardClassName?: string; + testimonialClassName?: string; + imageWrapperClassName?: string; + imageClassName?: string; + iconClassName?: string; + nameClassName?: string; + handleClassName?: string; + textBoxClassName?: string; + textBoxTitleClassName?: string; + textBoxTitleImageWrapperClassName?: string; + textBoxTitleImageClassName?: string; + textBoxDescriptionClassName?: string; + textBoxTagClassName?: string; + textBoxButtonContainerClassName?: string; + textBoxButtonClassName?: string; + textBoxButtonTextClassName?: string; } -export default function TestimonialCardSix({ - testimonials = [], - title = "Testimonials", description = "What customers say", animationType = "slide-up", useInvertedBackground = false, -}: TestimonialCardSixProps) { - const items = testimonials.map((testimonial) => ({ - id: testimonial.id, - label: testimonial.name, - detail: testimonial.company, - })); - - return ( -
-

{title}

-

{description}

- -
- ); +interface TestimonialCardProps { + testimonial: Testimonial; + useInvertedBackground: boolean; + cardClassName?: string; + testimonialClassName?: string; + imageWrapperClassName?: string; + imageClassName?: string; + iconClassName?: string; + nameClassName?: string; + handleClassName?: string; } + +const TestimonialCard = memo(({ + testimonial, + useInvertedBackground, + cardClassName = "", + testimonialClassName = "", + imageWrapperClassName = "", + imageClassName = "", + iconClassName = "", + nameClassName = "", + handleClassName = "", +}: TestimonialCardProps) => { + const Icon = testimonial.icon || Quote; + const theme = useTheme(); + const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle); + + return ( +
+

+ {testimonial.testimonial} +

+ + +
+ ); +}); + +TestimonialCard.displayName = "TestimonialCard"; + +const TestimonialCardSix = ({ + testimonials, + animationType, + title, + titleSegments, + description, + textboxLayout, + useInvertedBackground, + tag, + tagIcon, + tagAnimation, + buttons, + buttonAnimation, + speed = 40, + topMarqueeDirection = "left", + ariaLabel = "Testimonials section", + className = "", + containerClassName = "", + carouselClassName = "", + bottomCarouselClassName = "", + cardClassName = "", + testimonialClassName = "", + imageWrapperClassName = "", + imageClassName = "", + iconClassName = "", + nameClassName = "", + handleClassName = "", + textBoxClassName = "", + textBoxTitleClassName = "", + textBoxTitleImageWrapperClassName = "", + textBoxTitleImageClassName = "", + textBoxDescriptionClassName = "", + textBoxTagClassName = "", + textBoxButtonContainerClassName = "", + textBoxButtonClassName = "", + textBoxButtonTextClassName = "", +}: TestimonialCardSixProps) => { + return ( + + {testimonials.map((testimonial, index) => ( + + ))} + + ); +}; + +TestimonialCardSix.displayName = "TestimonialCardSix"; + +export default TestimonialCardSix; \ No newline at end of file