woedii/components/Recent_Card.tsx

33 lines
1001 B
TypeScript
Raw Normal View History

2025-04-28 00:47:36 +00:00
import Image from "next/image";
import React from "react";
2025-04-28 00:47:36 +00:00
interface RecentCardProps {
2025-04-28 00:47:36 +00:00
image: string;
title: string;
tag: string;
description: string;
}
const Recent_Card: React.FC<RecentCardProps> = ({ image, title, tag, description }) => {
2025-04-28 00:47:36 +00:00
return (
<div className="flex flex-col justify-start items-start w-full bg-white rounded-lg overflow-hidden">
<div className="recent_card flex justify-center items-center w-full h-32 sm:h-36 md:h-40 overflow-hidden">
2025-04-28 00:47:36 +00:00
<Image
src={image}
alt={title}
className="card_img object-cover w-full h-32 sm:h-36 md:h-40"
width={250}
height={150}
2025-04-28 00:47:36 +00:00
/>
</div>
<h3 className="text-xs sm:text-sm md:text-base font-medium text-slate-900 mt-2 truncate w-full p-2">
{title}
</h3>
<p className="text-xs font-normal text-slate-400 w-full p-2">
{tag} <span className="ml-1">{description}</span>
</p>
2025-04-28 00:47:36 +00:00
</div>
);
};
2025-04-28 00:47:36 +00:00
export default Recent_Card;