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

---
 .../social-media-widget.stories.tsx                | 49 ++++++++--------------
 1 file changed, 17 insertions(+), 32 deletions(-)

(limited to 'src/components/organisms/widgets/social-media-widget/social-media-widget.stories.tsx')

diff --git a/src/components/organisms/widgets/social-media-widget/social-media-widget.stories.tsx b/src/components/organisms/widgets/social-media-widget/social-media-widget.stories.tsx
index 5c6efb0..983ca48 100644
--- a/src/components/organisms/widgets/social-media-widget/social-media-widget.stories.tsx
+++ b/src/components/organisms/widgets/social-media-widget/social-media-widget.stories.tsx
@@ -1,43 +1,28 @@
-import type { ComponentMeta, ComponentStory } from '@storybook/react';
+import type { Meta, StoryObj } from '@storybook/react';
 import { Heading } from '../../../atoms';
-import { SocialMediaWidget, type SocialMediaData } from './social-media-widget';
+import { type SocialMediaData, SocialMediaWidget } from './social-media-widget';
 
-/**
- * SocialMedia - Storybook Meta
- */
-export default {
-  title: 'Organisms/Widgets/SocialMedia',
+const meta = {
   component: SocialMediaWidget,
-  argTypes: {
-    media: {
-      description: 'The social media data.',
-      type: {
-        name: 'object',
-        required: true,
-        value: {},
-      },
-    },
-  },
-} as ComponentMeta<typeof SocialMediaWidget>;
+  title: 'Organisms/Widgets/Social Media',
+} satisfies Meta<typeof SocialMediaWidget>;
+
+export default meta;
 
-const Template: ComponentStory<typeof SocialMediaWidget> = (args) => (
-  <SocialMediaWidget {...args} />
-);
+type Story = StoryObj<typeof meta>;
 
 const media: SocialMediaData[] = [
   { icon: 'Github', id: 'github', label: 'Github', url: '#' },
   { icon: 'LinkedIn', id: 'gitlab', label: 'Gitlab', url: '#' },
 ];
 
-/**
- * Widgets Stories - Social media
- */
-export const SocialMedia = Template.bind({});
-SocialMedia.args = {
-  heading: (
-    <Heading isFake level={3}>
-      Follow me
-    </Heading>
-  ),
-  media,
+export const SocialMedia: Story = {
+  args: {
+    heading: (
+      <Heading isFake level={3}>
+        Follow me
+      </Heading>
+    ),
+    media,
+  },
 };
-- 
cgit v1.2.3

