aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/widgets/links-list-widget.stories.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-11-14 15:11:22 +0100
committerArmand Philippot <git@armandphilippot.com>2023-11-14 19:06:42 +0100
commita3a4c50f26b8750ae1c87f1f1103b84b7d2e6315 (patch)
treeae286c7c6b3ab4f556f20adf5e42b24641351296 /src/components/organisms/widgets/links-list-widget.stories.tsx
parent50f1c501a87ef5f5650750dbeca797e833ec7c3a (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/organisms/widgets/links-list-widget.stories.tsx')
-rw-r--r--src/components/organisms/widgets/links-list-widget.stories.tsx91
1 files changed, 0 insertions, 91 deletions
diff --git a/src/components/organisms/widgets/links-list-widget.stories.tsx b/src/components/organisms/widgets/links-list-widget.stories.tsx
deleted file mode 100644
index 6e5f170..0000000
--- a/src/components/organisms/widgets/links-list-widget.stories.tsx
+++ /dev/null
@@ -1,91 +0,0 @@
-import type { ComponentMeta, ComponentStory } from '@storybook/react';
-import { Heading } from '../../atoms';
-import { LinksListWidget } from './links-list-widget';
-
-/**
- * LinksListWidget - Storybook Meta
- */
-export default {
- title: 'Organisms/Widgets/LinksList',
- component: LinksListWidget,
- args: {
- isOrdered: false,
- },
- argTypes: {
- className: {
- control: {
- type: 'text',
- },
- description: 'Set additional classnames to the list wrapper.',
- table: {
- category: 'Styles',
- },
- type: {
- name: 'string',
- required: false,
- },
- },
- items: {
- description: 'The widget data.',
- type: {
- name: 'object',
- required: true,
- value: {},
- },
- },
- },
-} as ComponentMeta<typeof LinksListWidget>;
-
-const Template: ComponentStory<typeof LinksListWidget> = (args) => (
- <LinksListWidget {...args} />
-);
-
-const items = [
- { name: 'Level 1: Item 1', url: '#' },
- {
- name: 'Level 1: Item 2',
- url: '#',
- child: [
- { name: 'Level 2: Item 1', url: '#' },
- { name: 'Level 2: Item 2', url: '#' },
- {
- name: 'Level 2: Item 3',
- url: '#',
- child: [
- { name: 'Level 3: Item 1', url: '#' },
- { name: 'Level 3: Item 2', url: '#' },
- ],
- },
- { name: 'Level 2: Item 4', url: '#' },
- ],
- },
- { name: 'Level 1: Item 3', url: '#' },
- { name: 'Level 1: Item 4', url: '#' },
-];
-
-/**
- * Links List Widget Stories - Unordered
- */
-export const Unordered = Template.bind({});
-Unordered.args = {
- heading: (
- <Heading isFake level={3}>
- Quo et totam
- </Heading>
- ),
- items,
-};
-
-/**
- * Links List Widget Stories - Ordered
- */
-export const Ordered = Template.bind({});
-Ordered.args = {
- heading: (
- <Heading isFake level={3}>
- Quo et totam
- </Heading>
- ),
- isOrdered: true,
- items,
-};