From 73e12fe8ae059ef70bbdf8716af421cb72aec76c Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Tue, 24 Oct 2023 19:26:47 +0200
Subject: refactor(components): rewrite Breadcrumbs component

---
 .../nav/breadcrumbs/breadcrumbs.stories.tsx        | 55 ++++++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 src/components/organisms/nav/breadcrumbs/breadcrumbs.stories.tsx

(limited to 'src/components/organisms/nav/breadcrumbs/breadcrumbs.stories.tsx')

diff --git a/src/components/organisms/nav/breadcrumbs/breadcrumbs.stories.tsx b/src/components/organisms/nav/breadcrumbs/breadcrumbs.stories.tsx
new file mode 100644
index 0000000..4736b26
--- /dev/null
+++ b/src/components/organisms/nav/breadcrumbs/breadcrumbs.stories.tsx
@@ -0,0 +1,55 @@
+import type { ComponentMeta, ComponentStory } from '@storybook/react';
+import { Breadcrumbs } from './breadcrumbs';
+
+/**
+ * Breadcrumbs - Storybook Meta
+ */
+export default {
+  title: 'Organisms/Nav/Breadcrumbs',
+  component: Breadcrumbs,
+  argTypes: {
+    items: {
+      description: 'The breadcrumb items.',
+      type: {
+        name: 'object',
+        required: true,
+        value: {},
+      },
+    },
+  },
+} as ComponentMeta<typeof Breadcrumbs>;
+
+const Template: ComponentStory<typeof Breadcrumbs> = (args) => (
+  <Breadcrumbs {...args} />
+);
+
+/**
+ * Breadcrumbs Stories - One item
+ */
+export const OneItem = Template.bind({});
+OneItem.args = {
+  items: [{ id: 'home', url: '#', name: 'Home' }],
+};
+
+/**
+ * Breadcrumbs Stories - Two items
+ */
+export const TwoItems = Template.bind({});
+TwoItems.args = {
+  items: [
+    { id: 'home', url: '#', name: 'Home' },
+    { id: 'blog', url: '#', name: 'Blog' },
+  ],
+};
+
+/**
+ * Breadcrumbs Stories - Three items
+ */
+export const ThreeItems = Template.bind({});
+ThreeItems.args = {
+  items: [
+    { id: 'home', url: '#', name: 'Home' },
+    { id: 'blog', url: '#', name: 'Blog' },
+    { id: 'post1', url: '#', name: 'A Post' },
+  ],
+};
-- 
cgit v1.2.3

