From a08291b1586858fc894a27d56f55f87a88f8dbd3 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Wed, 20 Apr 2022 19:24:21 +0200
Subject: refactor(storybook): reorganize design system

Add more stories for each components and change some components
categories for better organization.
---
 .../molecules/forms/theme-toggle.stories.tsx       | 44 +++++++++++++++++-----
 1 file changed, 34 insertions(+), 10 deletions(-)

(limited to 'src/components/molecules/forms/theme-toggle.stories.tsx')

diff --git a/src/components/molecules/forms/theme-toggle.stories.tsx b/src/components/molecules/forms/theme-toggle.stories.tsx
index a9bcf73..05d94b9 100644
--- a/src/components/molecules/forms/theme-toggle.stories.tsx
+++ b/src/components/molecules/forms/theme-toggle.stories.tsx
@@ -1,11 +1,27 @@
 import { ComponentMeta, ComponentStory } from '@storybook/react';
 import { IntlProvider } from 'react-intl';
-import ThemeToggleComponent from './theme-toggle';
+import ThemeToggle from './theme-toggle';
 
+/**
+ * ThemeToggle - Storybook Meta
+ */
 export default {
-  title: 'Molecules/Forms',
-  component: ThemeToggleComponent,
+  title: 'Molecules/Forms/Toggle',
+  component: ThemeToggle,
   argTypes: {
+    labelClassName: {
+      control: {
+        type: 'text',
+      },
+      description: 'Set additional classnames to the label wrapper.',
+      table: {
+        category: 'Styles',
+      },
+      type: {
+        name: 'string',
+        required: false,
+      },
+    },
     value: {
       control: {
         type: null,
@@ -17,15 +33,23 @@ export default {
       },
     },
   },
-} as ComponentMeta<typeof ThemeToggleComponent>;
+  decorators: [
+    (Story) => (
+      <IntlProvider locale="en">
+        <Story />
+      </IntlProvider>
+    ),
+  ],
+} as ComponentMeta<typeof ThemeToggle>;
 
-const Template: ComponentStory<typeof ThemeToggleComponent> = (args) => (
-  <IntlProvider locale="en">
-    <ThemeToggleComponent {...args} />
-  </IntlProvider>
+const Template: ComponentStory<typeof ThemeToggle> = (args) => (
+  <ThemeToggle {...args} />
 );
 
-export const ThemeToggle = Template.bind({});
-ThemeToggle.args = {
+/**
+ * Toggle Stories - Theme
+ */
+export const Theme = Template.bind({});
+Theme.args = {
   value: false,
 };
-- 
cgit v1.2.3

