aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/layout/cards-list.stories.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-10-10 19:37:51 +0200
committerArmand Philippot <git@armandphilippot.com>2023-11-11 18:14:41 +0100
commitc87c615b5866b8a8f361eeb0764bfdea85740e90 (patch)
treec27bda05fd96bbe3154472e170ba1abd5f9ea499 /src/components/organisms/layout/cards-list.stories.tsx
parent15522ec9146f6f1956620355c44dea2a6a75b67c (diff)
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...).
Diffstat (limited to 'src/components/organisms/layout/cards-list.stories.tsx')
-rw-r--r--src/components/organisms/layout/cards-list.stories.tsx35
1 files changed, 27 insertions, 8 deletions
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: '#',