"use client"; import { memo } from "react"; import Image from "next/image"; import { cls, shouldUseInvertedText } from "@/lib/utils"; import { useTheme } from "@/providers/themeProvider/ThemeProvider"; import type { LucideIcon } from "lucide-react"; interface TestimonialAuthorProps { name: string; subtitle: string; imageSrc?: string; imageAlt?: string; icon?: LucideIcon; useInvertedBackground?: "noInvert" | "invertDefault" | "invertCard"; className?: string; imageWrapperClassName?: string; imageClassName?: string; iconClassName?: string; nameClassName?: string; subtitleClassName?: string; } const TestimonialAuthor = memo(({ name, subtitle, imageSrc, imageAlt, icon: Icon, useInvertedBackground, className = "", imageWrapperClassName = "", imageClassName = "", iconClassName = "", nameClassName = "", subtitleClassName = "", }: TestimonialAuthorProps) => { const theme = useTheme(); const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle); return (
{subtitle}