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

---
 .../sharing-widget/sharing-widget.stories.tsx      | 59 +++++++---------------
 1 file changed, 17 insertions(+), 42 deletions(-)

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

diff --git a/src/components/organisms/widgets/sharing-widget/sharing-widget.stories.tsx b/src/components/organisms/widgets/sharing-widget/sharing-widget.stories.tsx
index 3e3cb68..773d251 100644
--- a/src/components/organisms/widgets/sharing-widget/sharing-widget.stories.tsx
+++ b/src/components/organisms/widgets/sharing-widget/sharing-widget.stories.tsx
@@ -1,50 +1,25 @@
-import type { ComponentMeta, ComponentStory } from '@storybook/react';
+import type { Meta, StoryObj } from '@storybook/react';
 import { Heading } from '../../../atoms';
 import { SharingWidget } from './sharing-widget';
 
-/**
- * SharingWidget - Storybook Meta
- */
-export default {
-  title: 'Organisms/Widgets/Sharing',
+const meta = {
   component: SharingWidget,
-  argTypes: {
-    data: {
-      description: 'The page data.',
-      type: {
-        name: 'object',
-        required: true,
-        value: {},
-      },
-    },
-    media: {
-      control: {
-        type: null,
-      },
-      description: 'An array of active and ordered sharing medium.',
-      type: {
-        name: 'string',
-        required: true,
-      },
-    },
-  },
-} as ComponentMeta<typeof SharingWidget>;
+  title: 'Organisms/Widgets/Sharing',
+} satisfies Meta<typeof SharingWidget>;
+
+export default meta;
 
-const Template: ComponentStory<typeof SharingWidget> = (args) => (
-  <SharingWidget {...args} />
-);
+type Story = StoryObj<typeof meta>;
 
-/**
- * SharingWidget Stories - Sharing
- */
-export const Sharing = Template.bind({});
-Sharing.args = {
-  data: {
-    excerpt:
-      'Alias similique eius ducimus laudantium aspernatur. Est rem ut eum temporibus sit reprehenderit aut non molestias. Vel dolorem expedita labore quo inventore aliquid nihil nam. Possimus nobis enim quas corporis eos.',
-    title: 'Accusantium totam nostrum',
-    url: 'https://www.example.test',
+export const Sharing: Story = {
+  args: {
+    data: {
+      excerpt:
+        'Alias similique eius ducimus laudantium aspernatur. Est rem ut eum temporibus sit reprehenderit aut non molestias. Vel dolorem expedita labore quo inventore aliquid nihil nam. Possimus nobis enim quas corporis eos.',
+      title: 'Accusantium totam nostrum',
+      url: 'https://www.example.test',
+    },
+    heading: <Heading level={3}>Share</Heading>,
+    media: ['diaspora', 'facebook', 'linkedin', 'twitter', 'email'],
   },
-  heading: <Heading level={3}>Share</Heading>,
-  media: ['diaspora', 'facebook', 'linkedin', 'twitter', 'email'],
 };
-- 
cgit v1.2.3

