AI store generator for ecommerce, Malaysia first. Laravel 13 + React + TypeScript.
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

testimonials.tsx 2.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. import type { TestimonialsSection } from '../types';
  2. import { Container, SectionHeading } from '../ui';
  3. export function Testimonials({ section }: { section: TestimonialsSection }) {
  4. const { heading, items } = section.content;
  5. if (section.variant === 'single') {
  6. const first = items[0];
  7. return (
  8. <section
  9. id={section.id}
  10. className="scroll-mt-20 bg-(--sf-surface) py-16 md:py-24"
  11. >
  12. <Container className="max-w-3xl text-center">
  13. <p className="text-sm font-semibold text-(--sf-primary)">
  14. {heading}
  15. </p>
  16. <blockquote className="sf-heading mt-6 text-2xl leading-snug text-balance sm:text-3xl">
  17. “{first.quote}”
  18. </blockquote>
  19. <p className="mt-6 text-sm text-(--sf-muted)">
  20. {first.name}
  21. {first.role ? ` · ${first.role}` : ''}
  22. </p>
  23. </Container>
  24. </section>
  25. );
  26. }
  27. return (
  28. <section
  29. id={section.id}
  30. className="scroll-mt-20 bg-(--sf-surface) py-16 md:py-20"
  31. >
  32. <Container>
  33. <SectionHeading heading={heading} />
  34. <ul className="mt-10 grid gap-5 md:grid-cols-3">
  35. {items.map((item) => (
  36. <li
  37. key={item.name + item.quote}
  38. className="flex flex-col justify-between gap-6 rounded-(--sf-radius-card) border border-(--sf-border) bg-(--sf-bg) p-6"
  39. >
  40. <blockquote className="leading-relaxed">
  41. “{item.quote}”
  42. </blockquote>
  43. <p className="text-sm">
  44. <span className="font-semibold">
  45. {item.name}
  46. </span>
  47. {item.role && (
  48. <span className="text-(--sf-muted)">
  49. {' '}
  50. · {item.role}
  51. </span>
  52. )}
  53. </p>
  54. </li>
  55. ))}
  56. </ul>
  57. </Container>
  58. </section>
  59. );
  60. }