From 94448fa278ab352a741ff13f22d6104869571144 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Wed, 18 Oct 2023 19:25:02 +0200
Subject: feat(components): add a generic Grid component

* merge Columns, Gallery and CardsList into Grid component
* add more options to control the grid
---
 src/pages/projets/index.tsx | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

(limited to 'src/pages/projets/index.tsx')

diff --git a/src/pages/projets/index.tsx b/src/pages/projets/index.tsx
index abb6da0..6ae476e 100644
--- a/src/pages/projets/index.tsx
+++ b/src/pages/projets/index.tsx
@@ -13,9 +13,9 @@ import {
   CardFooter,
   CardHeader,
   CardTitle,
-  CardsList,
-  type CardsListItem,
   getLayout,
+  Grid,
+  type GridItem,
   Link,
   MetaList,
   PageLayout,
@@ -61,7 +61,7 @@ const ProjectsPage: NextPageWithLayout<ProjectsPageProps> = ({ projects }) => {
     id: 'ADQmDF',
   });
 
-  const items: CardsListItem[] = projects.map(
+  const items: GridItem[] = projects.map(
     ({ id, meta: projectMeta, slug, title: projectTitle }) => {
       const { cover, tagline, technologies } = projectMeta;
       const figureLabel = intl.formatMessage(
@@ -74,7 +74,7 @@ const ProjectsPage: NextPageWithLayout<ProjectsPageProps> = ({ projects }) => {
       );
 
       return {
-        card: (
+        item: (
           <Card
             cover={
               cover ? (
@@ -165,7 +165,13 @@ const ProjectsPage: NextPageWithLayout<ProjectsPageProps> = ({ projects }) => {
         breadcrumb={breadcrumbItems}
         breadcrumbSchema={breadcrumbSchema}
       >
-        <CardsList className={styles.list} items={items} />
+        <Grid
+          className={styles.list}
+          gap="sm"
+          isCentered
+          items={items}
+          sizeMax="30ch"
+        />
       </PageLayout>
     </>
   );
-- 
cgit v1.2.3

