--- /** * TestimonialsGrid * Reviews/testimonials in een masonry-stijl grid of rij. * * Props: * - headline?: string * - testimonials: Array * - columns?: 2 | 3 */ interface Testimonial { quote: string; author: string; role?: string; company?: string; avatar?: string; rating?: 1 | 2 | 3 | 4 | 5; } interface Props { headline?: string; testimonials: Testimonial[]; columns?: 2 | 3; } const { headline, testimonials, columns = 3 } = Astro.props; ---
{headline &&

{headline}

}
    {testimonials.map(t => (
  • {t.rating && (
    {'★'.repeat(t.rating)}{'☆'.repeat(5 - t.rating)}
    )}
    "{t.quote}"
    {t.avatar && ( {t.author} )}
    {t.author} {(t.role || t.company) && (

    {[t.role, t.company].filter(Boolean).join(', ')}

    )}
  • ))}