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. --- src/components/atoms/lists/description-list.test.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/components/atoms/lists/description-list.test.tsx') diff --git a/src/components/atoms/lists/description-list.test.tsx b/src/components/atoms/lists/description-list.test.tsx index d3f7045..83e405f 100644 --- a/src/components/atoms/lists/description-list.test.tsx +++ b/src/components/atoms/lists/description-list.test.tsx @@ -2,14 +2,14 @@ import { render } from '@test-utils'; import DescriptionList, { DescriptionListItem } from './description-list'; const items: DescriptionListItem[] = [ - { id: 'term-1', term: 'Term 1:', value: ['Value for term 1'] }, - { id: 'term-2', term: 'Term 2:', value: ['Value for term 2'] }, + { id: 'term-1', label: 'Term 1:', value: ['Value for term 1'] }, + { id: 'term-2', label: 'Term 2:', value: ['Value for term 2'] }, { id: 'term-3', - term: 'Term 3:', + label: 'Term 3:', value: ['Value 1 for term 3', 'Value 2 for term 3', 'Value 3 for term 3'], }, - { id: 'term-4', term: 'Term 4:', value: ['Value for term 4'] }, + { id: 'term-4', label: 'Term 4:', value: ['Value for term 4'] }, ]; describe('DescriptionList', () => { -- cgit v1.2.3