Files
blog/src/components/Post/List.astro

32 lines
450 B
Plaintext

---
import type {Post} from "@/types/post";
import PostItem from '@/components/Post/Item.astro'
interface Props {
posts: Post[]
}
const {posts} = Astro.props
---
<section class="section">
<div class="post-list">
{posts.map(post => (
<PostItem post={post}/>
))}
</div>
</section>
<style>
.section {
flex: 1;
height: 100%;
}
.post-list {
display: flex;
flex-direction: column;
gap: 20px;
}
</style>