TestimonialCard.tsx 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. import Link from "next/link"
  2. import Image from "next/legacy/image"
  3. import type { Testimonial } from "../data/testimonials"
  4. export type TestimonialCardProps = {
  5. testimonial: Testimonial
  6. }
  7. /**
  8. * TestimonialCard component.
  9. * Layout (width, height, positioning) can be set from the parent.
  10. */
  11. export const TestimonialCard = ({ testimonial }: TestimonialCardProps) => {
  12. return (
  13. <div className="keen-slider__slide inline-block h-max w-full space-y-6 rounded-md bg-white p-8">
  14. <div className="flex items-center justify-center">
  15. <Image
  16. className="rounded-[50%]"
  17. src={testimonial.avatar}
  18. alt=""
  19. width="100"
  20. height="100"
  21. />
  22. </div>
  23. <p className="b1 text-center">{testimonial.text}</p>
  24. <div className="b2 text-center">
  25. <span className="block font-bold">{testimonial.name}</span>
  26. <span className="font-semibold text-blurple-600">
  27. @{testimonial.username}
  28. </span>
  29. </div>
  30. </div>
  31. )
  32. }
  33. export default TestimonialCard