From 0f936ec0e7606cb79434d94096b6e113a7ce78eb Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Fri, 15 Dec 2023 18:35:16 +0100
Subject: refactor(stories): migrate stories to CSF3 format

---
 .../molecules/nav/nav-item/nav-item.stories.tsx    | 46 ++++++++--------------
 1 file changed, 17 insertions(+), 29 deletions(-)

(limited to 'src/components/molecules/nav/nav-item/nav-item.stories.tsx')

diff --git a/src/components/molecules/nav/nav-item/nav-item.stories.tsx b/src/components/molecules/nav/nav-item/nav-item.stories.tsx
index df736a4..3d77b4d 100644
--- a/src/components/molecules/nav/nav-item/nav-item.stories.tsx
+++ b/src/components/molecules/nav/nav-item/nav-item.stories.tsx
@@ -1,37 +1,25 @@
-import type { ComponentMeta, ComponentStory } from '@storybook/react';
+import type { Meta, StoryObj } from '@storybook/react';
 import { NavLink } from '../nav-link';
-import { NavItem } from './nav-item';
+import { NavItem, type NavItemProps } from './nav-item';
 
-/**
- * NavItem - Storybook Meta
- */
-export default {
-  title: 'Molecules/Nav/NavItem',
-  component: NavItem,
-  argTypes: {
-    children: {
-      control: {
-        type: 'text',
-      },
-      description: 'Define the nav item contents.',
-      type: {
-        name: 'string',
-        required: true,
-      },
-    },
-  },
-} as ComponentMeta<typeof NavItem>;
-
-const Template: ComponentStory<typeof NavItem> = (args) => (
+const WrappedNavItem = (args: NavItemProps) => (
   <ul style={{ margin: 0, padding: 0 }}>
     <NavItem {...args} />
   </ul>
 );
 
-/**
- * NavItem Stories - Default
- */
-export const Default = Template.bind({});
-Default.args = {
-  children: <NavLink href="#example" label="Example" />,
+const meta = {
+  component: NavItem,
+  title: 'Molecules/Nav/Item',
+  render: WrappedNavItem,
+} satisfies Meta<typeof NavItem>;
+
+export default meta;
+
+type Story = StoryObj<typeof meta>;
+
+export const Example: Story = {
+  args: {
+    children: <NavLink href="#example" label="Example" />,
+  },
 };
-- 
cgit v1.2.3

