| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- import type { TestimonialsSection } from '../types';
- import { Container, SectionHeading } from '../ui';
-
- export function Testimonials({ section }: { section: TestimonialsSection }) {
- const { heading, items } = section.content;
-
- if (section.variant === 'single') {
- const first = items[0];
-
- return (
- <section
- id={section.id}
- className="scroll-mt-20 bg-(--sf-surface) py-16 md:py-24"
- >
- <Container className="max-w-3xl text-center">
- <p className="text-sm font-semibold text-(--sf-primary)">
- {heading}
- </p>
- <blockquote className="sf-heading mt-6 text-2xl leading-snug text-balance sm:text-3xl">
- “{first.quote}”
- </blockquote>
- <p className="mt-6 text-sm text-(--sf-muted)">
- {first.name}
- {first.role ? ` · ${first.role}` : ''}
- </p>
- </Container>
- </section>
- );
- }
-
- return (
- <section
- id={section.id}
- className="scroll-mt-20 bg-(--sf-surface) py-16 md:py-20"
- >
- <Container>
- <SectionHeading heading={heading} />
- <ul className="mt-10 grid gap-5 md:grid-cols-3">
- {items.map((item) => (
- <li
- key={item.name + item.quote}
- className="flex flex-col justify-between gap-6 rounded-(--sf-radius-card) border border-(--sf-border) bg-(--sf-bg) p-6"
- >
- <blockquote className="leading-relaxed">
- “{item.quote}”
- </blockquote>
- <p className="text-sm">
- <span className="font-semibold">
- {item.name}
- </span>
- {item.role && (
- <span className="text-(--sf-muted)">
- {' '}
- · {item.role}
- </span>
- )}
- </p>
- </li>
- ))}
- </ul>
- </Container>
- </section>
- );
- }
|