diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-11-14 15:11:22 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-11-14 19:06:42 +0100 |
| commit | a3a4c50f26b8750ae1c87f1f1103b84b7d2e6315 (patch) | |
| tree | ae286c7c6b3ab4f556f20adf5e42b24641351296 /src/components/templates | |
| parent | 50f1c501a87ef5f5650750dbeca797e833ec7c3a (diff) | |
refactor(components): replace LinksListWidget with LinksWidget
* avoid List component repeat
* rewrite tests and CSS
* add an id to LinksWidgetItemData (previously LinksListItems) type
because the label could be duplicated
Diffstat (limited to 'src/components/templates')
| -rw-r--r-- | src/components/templates/page/page-layout.stories.tsx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/components/templates/page/page-layout.stories.tsx b/src/components/templates/page/page-layout.stories.tsx index 9f0cce1..2b44933 100644 --- a/src/components/templates/page/page-layout.stories.tsx +++ b/src/components/templates/page/page-layout.stories.tsx @@ -1,6 +1,6 @@ import type { ComponentMeta, ComponentStory } from '@storybook/react'; import { ButtonLink, Heading, Link } from '../../atoms'; -import { LinksListWidget, PostsList, SharingWidget } from '../../organisms'; +import { LinksWidget, PostsList, SharingWidget } from '../../organisms'; import { LayoutBase } from '../layout/layout.stories'; import { PageLayout as PageLayoutComponent } from './page-layout'; @@ -457,13 +457,10 @@ const postsListBreadcrumb = [ ]; const blogCategories = [ - { name: 'Cat 1', url: '#' }, - { - name: 'Cat 2', - url: '#', - }, - { name: 'Cat 3', url: '#' }, - { name: 'Cat 4', url: '#' }, + { id: 'cat1', label: 'Cat 1', url: '#' }, + { id: 'cat2', label: 'Cat 2', url: '#' }, + { id: 'cat3', label: 'Cat 3', url: '#' }, + { id: 'cat4', label: 'Cat 4', url: '#' }, ]; const posts = [ @@ -503,7 +500,7 @@ Blog.args = { headerMeta: [{ id: 'total', label: 'Total:', value: `${posts.length}` }], children: <PostsList posts={posts} sortByYear />, widgets: [ - <LinksListWidget + <LinksWidget heading={ <Heading isFake level={3}> Categories |
