Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mastodon
GitHub Repository: mastodon/joinmastodon
Path: blob/main/components/TestimonialCard.tsx
1006 views
1
import Image from "next/legacy/image"
2
import type { Testimonial } from "../data/testimonials"
3
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
24
<p className="b1 text-center">{testimonial.text}</p>
25
26
<div className="b2 text-center">
27
<span className="block font-bold">{testimonial.name}</span>
28
<span className="font-semibold text-blurple-600">
29
@{testimonial.username}
30
</span>
31
</div>
32
</div>
33
)
34
}
35
36
export default TestimonialCard
37
38