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

---
 .../project-overview/project-overview.stories.tsx  | 90 +++++++---------------
 1 file changed, 26 insertions(+), 64 deletions(-)

(limited to 'src/components/organisms/project-overview/project-overview.stories.tsx')

diff --git a/src/components/organisms/project-overview/project-overview.stories.tsx b/src/components/organisms/project-overview/project-overview.stories.tsx
index 0c4138c..d1697f7 100644
--- a/src/components/organisms/project-overview/project-overview.stories.tsx
+++ b/src/components/organisms/project-overview/project-overview.stories.tsx
@@ -1,78 +1,40 @@
-import type { ComponentMeta, ComponentStory } from '@storybook/react';
+import type { Meta, StoryObj } from '@storybook/react';
 import NextImage from 'next/image';
 import { type OverviewMeta, ProjectOverview } from './project-overview';
 
-/**
- * ProjectOverview - Storybook Meta
- */
-export default {
-  title: 'Organisms/ProjectOverview',
+const meta = {
   component: ProjectOverview,
-  argTypes: {
-    cover: {
-      description: 'The project cover',
-      table: {
-        category: 'Options',
-      },
-      type: {
-        name: 'object',
-        required: false,
-        value: {},
-      },
-    },
-    meta: {
-      description: 'The overview meta.',
-      type: {
-        name: 'object',
-        required: true,
-        value: {},
-      },
-    },
-    name: {
-      control: {
-        type: 'text',
-      },
-      description: 'The project name.',
-      type: {
-        name: 'string',
-        required: true,
-      },
-    },
-  },
-} as ComponentMeta<typeof ProjectOverview>;
+  title: 'Organisms/ProjectOverview',
+} satisfies Meta<typeof ProjectOverview>;
 
-const Template: ComponentStory<typeof ProjectOverview> = (args) => (
-  <ProjectOverview {...args} />
-);
+export default meta;
 
-const meta = {
+type Story = StoryObj<typeof meta>;
+
+const projectMeta = {
   creationDate: '2015-09-02',
   lastUpdateDate: '2023-11-10',
   license: 'MIT',
 } satisfies Partial<OverviewMeta>;
 
-/**
- * ProjectOverview Stories - Meta
- */
-export const Meta = Template.bind({});
-Meta.args = {
-  meta,
-  name: 'Your project',
+export const Example: Story = {
+  args: {
+    meta: projectMeta,
+    name: 'Your project',
+  },
 };
 
-/**
- * ProjectOverview Stories - With cover
- */
-export const WithCover = Template.bind({});
-WithCover.args = {
-  cover: (
-    <NextImage
-      alt=""
-      height={480}
-      src="https://picsum.photos/640/480"
-      width={640}
-    />
-  ),
-  meta,
-  name: 'Your project',
+export const WithCover: Story = {
+  args: {
+    cover: (
+      <NextImage
+        alt=""
+        height={480}
+        src="https://picsum.photos/640/480"
+        width={640}
+      />
+    ),
+    meta: projectMeta,
+    name: 'Your project',
+  },
 };
-- 
cgit v1.2.3

