From b3ac82bba9605fa9d9c4b1d29c5a56a52e9de015 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Fri, 15 Apr 2022 17:38:16 +0200
Subject: chore: add a SocialMedia component

---
 .../organisms/widgets/social-media.stories.tsx     | 56 ++++++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 src/components/organisms/widgets/social-media.stories.tsx

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

diff --git a/src/components/organisms/widgets/social-media.stories.tsx b/src/components/organisms/widgets/social-media.stories.tsx
new file mode 100644
index 0000000..2b84012
--- /dev/null
+++ b/src/components/organisms/widgets/social-media.stories.tsx
@@ -0,0 +1,56 @@
+import { ComponentMeta, ComponentStory } from '@storybook/react';
+import { IntlProvider } from 'react-intl';
+import SocialMediaWidget, { Media } from './social-media';
+
+export default {
+  title: 'Organisms/Widgets',
+  component: SocialMediaWidget,
+  argTypes: {
+    level: {
+      control: {
+        type: 'number',
+      },
+      description: 'The heading level.',
+      type: {
+        name: 'number',
+        required: true,
+      },
+    },
+    media: {
+      description: 'The links data.',
+      type: {
+        name: 'object',
+        required: true,
+        value: {},
+      },
+    },
+    title: {
+      control: {
+        type: 'text',
+      },
+      description: 'The widget title.',
+      type: {
+        name: 'string',
+        required: true,
+      },
+    },
+  },
+} as ComponentMeta<typeof SocialMediaWidget>;
+
+const Template: ComponentStory<typeof SocialMediaWidget> = (args) => (
+  <IntlProvider locale="en">
+    <SocialMediaWidget {...args} />
+  </IntlProvider>
+);
+
+const media: Media[] = [
+  { name: 'Github', url: '#' },
+  { name: 'LinkedIn', url: '#' },
+];
+
+export const SocialMedia = Template.bind({});
+SocialMedia.args = {
+  media,
+  title: 'Follow me',
+  level: 2,
+};
-- 
cgit v1.2.3

