refactor: use css theme variables, enforce strict typing without any and remove dead Hero component
This commit is contained in:
@@ -9,19 +9,19 @@ type Props = Extract<NonNullable<Page['layout']>[0], { blockType: 'servicesList'
|
||||
|
||||
export const ServicesListBlock: React.FC<Props> = ({ title, services }) => {
|
||||
return (
|
||||
<section className="py-24 bg-white">
|
||||
<section className="py-24 bg-background">
|
||||
<div className="container mx-auto px-4">
|
||||
<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">
|
||||
{services?.map((service: any, index: number) => (
|
||||
{services?.map((service: NonNullable<Props['services']>[0], index: number) => (
|
||||
<motion.div
|
||||
key={service.id || index}
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
@@ -30,10 +30,10 @@ export const ServicesListBlock: React.FC<Props> = ({ title, services }) => {
|
||||
transition={{ duration: 0.5, delay: index * 0.1 }}
|
||||
className="group"
|
||||
>
|
||||
<Link href="/uslugi" className="block h-full p-8 rounded-2xl bg-slate-50 border border-slate-100 transition-all duration-300 hover:-translate-y-2 hover:shadow-xl hover:bg-white">
|
||||
<h3 className="text-xl font-bold text-slate-900 mb-4">{service.title}</h3>
|
||||
<p className="text-slate-600 mb-8">{service.description}</p>
|
||||
<div className="flex items-center text-blue-600 font-semibold group-hover:text-blue-700 mt-auto">
|
||||
<Link href="/uslugi" className="block h-full p-8 rounded-2xl bg-card border border-border transition-all duration-300 hover:-translate-y-2 hover:shadow-xl hover:bg-background">
|
||||
<h3 className="text-xl font-bold text-foreground mb-4">{service.title}</h3>
|
||||
<p className="text-foreground/80 mb-8">{service.description}</p>
|
||||
<div className="flex items-center text-accent font-semibold group-hover:text-accent-hover mt-auto">
|
||||
{service.linkText}
|
||||
<ArrowRight size={20} className="ml-2 transition-transform group-hover:translate-x-1" />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user