web-portfolio/components/ArticleListItem.tsx

27 lines
841 B
TypeScript
Raw Normal View History

2026-07-16 16:41:56 -05:00
import Link from "next/link"
2026-07-23 20:13:59 -05:00
import type {ArticleItem} from "@/types";
2026-07-16 16:41:56 -05:00
interface Props {
category: string,
articles: ArticleItem[]
}
2026-07-23 20:13:59 -05:00
const ArticleItemList = ({category, articles}: Props) => {
2026-07-16 16:41:56 -05:00
return (
<>
<div className={"flex flex-col gap-5"}>
<h2 className={"font-cormorantGaramond text-4xl"}>{category}</h2>
<div className={"flex flex-col gap-2.5 font-poppins text-lg"}>
{articles.map((article, id) => (
2026-07-23 20:13:59 -05:00
<Link href={`/blog/${article.id}`} key={id}
className={"hover:text-nord-12 transition duration-250"}>
2026-07-16 16:41:56 -05:00
{article.title}
</Link>
))}
</div>
</div>
</>
)
}
export default ArticleItemList