Files
webb/src/components/sections/CtaBannerSection.tsx
T

67 lines
2.1 KiB
TypeScript
Raw Normal View History

import React from 'react';
import Link from 'next/link';
import { ArrowRight } from 'lucide-react';
import { resolveLocalised } from '@/types';
interface CtaBannerSectionProps {
title?: any;
subtitle?: any;
primaryCta?: {
label: any;
href: string;
};
secondaryCta?: {
label: any;
href: string;
};
locale?: string;
}
export function CtaBannerSection({
title,
subtitle,
primaryCta,
secondaryCta,
locale = 'en',
}: CtaBannerSectionProps) {
return (
<section className="py-12 lg:py-16">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="rounded-3xl bg-gradient-to-r from-blue-600 via-indigo-600 to-teal-600 p-8 sm:p-12 text-center text-white shadow-2xl relative overflow-hidden">
<div className="relative z-10 max-w-2xl mx-auto space-y-4">
{title && (
<h2 className="text-3xl sm:text-4xl font-extrabold tracking-tight">
{resolveLocalised(title, locale)}
</h2>
)}
{subtitle && (
<p className="text-base text-blue-100">
{resolveLocalised(subtitle, locale)}
</p>
)}
<div className="pt-4 flex flex-wrap items-center justify-center gap-4">
{primaryCta && (
<Link
href={primaryCta.href}
className="px-6 py-3.5 rounded-xl text-sm font-semibold text-slate-900 bg-white hover:bg-slate-100 shadow-md transition-all hover:scale-105 active:scale-95"
>
{resolveLocalised(primaryCta.label, locale)}
</Link>
)}
{secondaryCta && (
<Link
href={secondaryCta.href}
className="px-6 py-3.5 rounded-xl text-sm font-semibold text-white border border-white/40 hover:bg-white/10 transition-colors"
>
{resolveLocalised(secondaryCta.label, locale)}
</Link>
)}
</div>
</div>
</div>
</div>
</section>
);
}