From c87c615b5866b8a8f361eeb0764bfdea85740e90 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Tue, 10 Oct 2023 19:37:51 +0200
Subject: refactor(components): replace Meta component with MetaList

It removes items complexity by allowing consumers to use any label/value
association. Translations should also be defined by the consumer.
Each item can now be configured separately (borders, layout...).
---
 .../organisms/layout/cards-list.stories.tsx        | 35 +++++++++++++++++-----
 1 file changed, 27 insertions(+), 8 deletions(-)

(limited to 'src/components/organisms/layout/cards-list.stories.tsx')

diff --git a/src/components/organisms/layout/cards-list.stories.tsx b/src/components/organisms/layout/cards-list.stories.tsx
index 1b5051f..03feee7 100644
--- a/src/components/organisms/layout/cards-list.stories.tsx
+++ b/src/components/organisms/layout/cards-list.stories.tsx
@@ -90,11 +90,21 @@ const items: CardsListItem[] = [
     id: 'card-1',
     cover: {
       alt: 'card 1 picture',
-      src: 'http://picsum.photos/640/480',
+      src: 'https://picsum.photos/640/480',
       width: 640,
       height: 480,
     },
-    meta: { thematics: ['Velit', 'Ex', 'Alias'] },
+    meta: [
+      {
+        id: 'categories',
+        label: 'Categories',
+        value: [
+          { id: 'velit', value: 'Velit' },
+          { id: 'ex', value: 'Ex' },
+          { id: 'alias', value: 'Alias' },
+        ],
+      },
+    ],
     tagline: 'Molestias ut error',
     title: 'Et alias omnis',
     url: '#',
@@ -103,11 +113,11 @@ const items: CardsListItem[] = [
     id: 'card-2',
     cover: {
       alt: 'card 2 picture',
-      src: 'http://picsum.photos/640/480',
+      src: 'https://picsum.photos/640/480',
       width: 640,
       height: 480,
     },
-    meta: { thematics: ['Voluptas'] },
+    meta: [{ id: 'categories', label: 'Categories', value: 'Voluptas' }],
     tagline: 'Quod vel accusamus',
     title: 'Laboriosam doloremque mollitia',
     url: '#',
@@ -116,13 +126,22 @@ const items: CardsListItem[] = [
     id: 'card-3',
     cover: {
       alt: 'card 3 picture',
-      src: 'http://picsum.photos/640/480',
+      src: 'https://picsum.photos/640/480',
       width: 640,
       height: 480,
     },
-    meta: {
-      thematics: ['Quisquam', 'Quia', 'Sapiente', 'Perspiciatis'],
-    },
+    meta: [
+      {
+        id: 'categories',
+        label: 'Categories',
+        value: [
+          { id: 'quisquam', value: 'Quisquam' },
+          { id: 'quia', value: 'Quia' },
+          { id: 'sapiente', value: 'Sapiente' },
+          { id: 'perspiciatis', value: 'Perspiciatis' },
+        ],
+      },
+    ],
     tagline: 'Quo error eum',
     title: 'Magni rem nulla',
     url: '#',
-- 
cgit v1.2.3

