From 40285d9ee6235f19bcaa9ff96b386d84177c9b34 Mon Sep 17 00:00:00 2001 From: Krishna Ayyalasomayajula Date: Mon, 1 Jun 2026 19:56:35 -0500 Subject: [PATCH] feat: add post card component with scroll animation --- components/blog/PostCard.tsx | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 components/blog/PostCard.tsx diff --git a/components/blog/PostCard.tsx b/components/blog/PostCard.tsx new file mode 100644 index 0000000..86fc122 --- /dev/null +++ b/components/blog/PostCard.tsx @@ -0,0 +1,29 @@ +import Link from "next/link"; +import { motion } from "motion/react"; +import type { PostMeta } from "@/lib/posts"; + +interface PostCardProps extends PostMeta { + index?: number; +} + +export function PostCard({ slug, title, date, excerpt, index = 0 }: PostCardProps) { + return ( + + + +

+ {title} +

+ {excerpt && ( +

{excerpt}

+ )} + +
+ ); +}