refactor: use css theme variables, enforce strict typing without any and remove dead Hero component
This commit is contained in:
@@ -8,30 +8,30 @@ type Props = Extract<NonNullable<Page['layout']>[0], { blockType: 'testimonials'
|
||||
|
||||
export const TestimonialsBlock: React.FC<Props> = ({ title, testimonials }) => {
|
||||
return (
|
||||
<section className="py-24 bg-white">
|
||||
<section className="py-24 bg-background">
|
||||
<div className="container mx-auto px-4 max-w-6xl">
|
||||
<motion.h2
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
className="text-3xl md:text-5xl font-bold text-slate-900 mb-16 text-center"
|
||||
className="text-3xl md:text-5xl font-bold text-foreground mb-16 text-center"
|
||||
>
|
||||
{title}
|
||||
</motion.h2>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
|
||||
{testimonials?.map((t: any, index: number) => (
|
||||
{testimonials?.map((t: NonNullable<Props['testimonials']>[0], index: number) => (
|
||||
<motion.div
|
||||
key={t.id || index}
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: index * 0.1 }}
|
||||
className="bg-slate-50 p-8 rounded-2xl relative"
|
||||
className="bg-card p-8 rounded-2xl relative"
|
||||
>
|
||||
<Quote className="absolute top-6 right-6 text-slate-200" size={40} />
|
||||
<p className="text-slate-700 italic mb-6 relative z-10">"{t.quote}"</p>
|
||||
<div className="font-semibold text-slate-900">— {t.author}</div>
|
||||
<Quote className="absolute top-6 right-6 text-border" size={40} />
|
||||
<p className="text-foreground/80 italic mb-6 relative z-10">"{t.quote}"</p>
|
||||
<div className="font-semibold text-foreground">— {t.author}</div>
|
||||
</motion.div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user