feat: truncate testimonial title snippet to 35 characters with line-clamp support
This commit is contained in:
@@ -11,6 +11,8 @@ interface TestimonialCardProps {
|
||||
}
|
||||
|
||||
export function TestimonialCard({ text, author, role, rating }: TestimonialCardProps) {
|
||||
// Title snippet: first ~35 chars of the testimonial text (matches mobile behavior)
|
||||
const titleSnippet = text.length > 35 ? `${text.slice(0, 35)} ..` : text;
|
||||
return (
|
||||
<div className="p-4 border border-[#00293D]/10 rounded-[15px] h-full flex flex-col">
|
||||
<div className="mb-4">
|
||||
@@ -21,7 +23,7 @@ export function TestimonialCard({ text, author, role, rating }: TestimonialCardP
|
||||
height={13}
|
||||
className="mb-3"
|
||||
/>
|
||||
<p className="font-medium text-[#00293D] text-[14px] leading-[17px] font-fractul">I have been working with Lorem .</p>
|
||||
<p className="font-medium text-[#00293D] text-[14px] leading-[17px] font-fractul line-clamp-1">{titleSnippet}</p>
|
||||
</div>
|
||||
<p className="text-[#00293D] text-[14px] leading-[19px] font-normal font-serif mb-4 flex-1">{text}</p>
|
||||
<div className="pt-4 border-t border-[#00293D]/20 space-y-2">
|
||||
|
||||
Reference in New Issue
Block a user