memorium/components/Card.tsx

32 lines
778 B
TypeScript
Raw Normal View History

export function Card(
{ link, title, image }: { link?: string; title?: string; image?: string },
) {
return (
<a
href={link}
style={{
backgroundImage: `url(${image})`,
backgroundSize: "cover",
2023-07-31 17:21:17 +02:00
//background: "#2B2930",
}}
2023-07-30 23:55:51 +02:00
class="text-white rounded-3xl shadow-md p-4 relative overflow-hidden
lg:w-56 lg:h-56
2023-08-02 01:58:03 +02:00
sm:w-48 sm:h-48
2023-08-02 17:35:10 +02:00
w-[37vw] h-[37vw]"
>
<div class="h-full flex flex-col justify-between relative z-10">
<div>
{/* Recipe Card content */}
</div>
<div class="mt-2">
{title}
</div>
</div>
2023-07-31 17:21:17 +02:00
<div
class="absolute inset-x-0 bottom-0 h-3/4"
style={{ background: "linear-gradient(transparent, #000e)" }}
/>
</a>
);
}