From 0d59a6d2995b4119865271ed1908ede0bb96497c Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 9 May 2022 18:19:38 +0200 Subject: refactor: rewrite DescriptionList and Meta components The meta can have different layout. The previous implementation was not enough to easily change the layout. Also, I prefer to restrict the meta types and it prevents me to repeat myself for the labels. --- .../organisms/layout/summary.stories.tsx | 33 ++++++++-------------- 1 file changed, 11 insertions(+), 22 deletions(-) (limited to 'src/components/organisms/layout/summary.stories.tsx') diff --git a/src/components/organisms/layout/summary.stories.tsx b/src/components/organisms/layout/summary.stories.tsx index 05be7da..42f1d44 100644 --- a/src/components/organisms/layout/summary.stories.tsx +++ b/src/components/organisms/layout/summary.stories.tsx @@ -1,5 +1,4 @@ import { ComponentMeta, ComponentStory } from '@storybook/react'; -import { IntlProvider } from 'react-intl'; import Summary from './summary'; /** @@ -78,13 +77,6 @@ export default { }, }, }, - decorators: [ - (Story) => ( - - - - ), - ], } as ComponentMeta; const Template: ComponentStory = (args) => ( @@ -100,20 +92,17 @@ const cover = { }; const meta = { - publication: { name: 'Published on:', value: 'April 11th 2022' }, - readingTime: { name: 'Reading time:', value: '5 minutes' }, - categories: { - name: 'Categories:', - value: [ - - Cat 1 - , - - Cat 2 - , - ], - }, - comments: { name: 'Comments:', value: '1 comment' }, + publication: { date: '2022-04-11' }, + readingTime: '5 minutes', + thematics: [ + + Cat 1 + , + + Cat 2 + , + ], + commentsCount: '1 comment', }; /** -- cgit v1.2.3