PreStyling Layouts & Components
This commit is contained in:
23
src/components/post/ArticleCard/ArticleCardGrid.astro
Normal file
23
src/components/post/ArticleCard/ArticleCardGrid.astro
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
import type { Article } from '@/lib/site/types'
|
||||
|
||||
import ArticleCardItem from './ArticleCardItem.astro'
|
||||
|
||||
type Props = {
|
||||
articles: Article[]
|
||||
title?: string
|
||||
}
|
||||
|
||||
const { articles, title } = Astro.props
|
||||
---
|
||||
|
||||
{articles.length > 0 && (
|
||||
<section class="cards">
|
||||
{title && <h2 class="title">{title}</h2>}
|
||||
<div class="grid">
|
||||
{articles.map((article) => (
|
||||
<ArticleCardItem article={article} />
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
)}
|
||||
Reference in New Issue
Block a user