ldc-bien-etre-animal/resources/ts/front/Components/Shared/ContentCard.tsx
2026-09-04 16:56:34 +02:00

60 lines
1.5 KiB
TypeScript

import { ArrowRight } from "lucide-react";
import CtaButton from "@/front/Components/Layout/CtaButton";
interface ContentCardProps {
title: string;
description: string;
btnText: string;
btnLink: string;
bgColor?: string;
maxWidth?: string;
className?: string;
padding?: string;
textColor?: string;
}
export default function ContentCard({
title,
description,
btnText,
btnLink,
bgColor = "bg-light-orange",
maxWidth = "max-w-[665px]",
className = "",
padding = "p-8",
textColor = "text-bleu",
}: Readonly<ContentCardProps>) {
return (
<div className={`relative ${maxWidth} ${className}`}>
<div
className={`absolute inset-0 rounded-[1.25rem] -rotate-2 drop-shadow-card-blue ${bgColor}`}
/>
<div
className={`relative space-y-6 flex flex-col items-center ${padding}`}
>
<div className="space-y-4">
<h4 className={`font-lato-bold text-2xl lg:text-h4 ${textColor}`}>
{title}
</h4>
<div
className={`font-poppins-regular text-sm lg:text-body ${textColor}`}
dangerouslySetInnerHTML={{ __html: description }}
/>
</div>
{btnLink && (
<CtaButton
href={btnLink}
icon={<ArrowRight />}
iconPosition="right"
color="rouge"
size="md"
className="drop-shadow-card-blue"
>
{btnText}
</CtaButton>
)}
</div>
</div>
);
}