Files
my-website-v2/frontend/components/PostCarousel.tsx

25 lines
611 B
TypeScript
Raw Permalink Normal View History

import { PostCard } from "./PostCard.tsx";
import { Post } from "../types/index.ts";
2024-12-02 18:29:45 -05:00
interface PostOpts {
posts: Post[];
colorValue: string;
2024-12-02 18:29:45 -05:00
}
export const PostCarousel = function PostCarousel({
posts,
colorValue,
}: PostOpts) {
2024-12-02 18:29:45 -05:00
return (
<div className="flex w-full justify-start items-start bg-[#313244] p-8">
<div className="max-w-7xl mx-auto">
<div className="flex flex-wrap justify-center gap-3">
{posts.map((post: Post) => (
<PostCard key={post.post_id} post={post} colorValue={colorValue} />
))}
2024-12-02 18:29:45 -05:00
</div>
</div>
</div>
);
};