From 8320b1d39ea6402c32e907dbb35082efc6af9f5a Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Tue, 31 May 2022 19:40:23 +0200
Subject: chore: replace the toggle component

---
 .../molecules/forms/motion-toggle.stories.tsx      | 30 ++++++++--------------
 1 file changed, 10 insertions(+), 20 deletions(-)

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

diff --git a/src/components/molecules/forms/motion-toggle.stories.tsx b/src/components/molecules/forms/motion-toggle.stories.tsx
index e9939bd..5c524a8 100644
--- a/src/components/molecules/forms/motion-toggle.stories.tsx
+++ b/src/components/molecules/forms/motion-toggle.stories.tsx
@@ -1,5 +1,6 @@
 import { ComponentMeta, ComponentStory } from '@storybook/react';
 import MotionToggleComponent from './motion-toggle';
+import { storageKey } from './motion-toggle.fixture';
 
 /**
  * MotionToggle - Storybook Meta
@@ -8,24 +9,22 @@ export default {
   title: 'Molecules/Forms/Toggle',
   component: MotionToggleComponent,
   argTypes: {
-    className: {
+    defaultValue: {
       control: {
-        type: 'text',
-      },
-      description: 'Set additional classnames to the toggle wrapper.',
-      table: {
-        category: 'Styles',
+        type: 'select',
       },
+      description: 'Set the default value.',
+      options: ['on', 'off'],
       type: {
         name: 'string',
-        required: false,
+        required: true,
       },
     },
-    labelClassName: {
+    legendClassName: {
       control: {
         type: 'text',
       },
-      description: 'Set additional classnames to the label wrapper.',
+      description: 'Set additional classnames to the legend.',
       table: {
         category: 'Styles',
       },
@@ -44,16 +43,6 @@ export default {
         required: true,
       },
     },
-    value: {
-      control: {
-        type: null,
-      },
-      description: 'The reduce motion value.',
-      type: {
-        name: 'boolean',
-        required: true,
-      },
-    },
   },
 } as ComponentMeta<typeof MotionToggleComponent>;
 
@@ -66,5 +55,6 @@ const Template: ComponentStory<typeof MotionToggleComponent> = (args) => (
  */
 export const Motion = Template.bind({});
 Motion.args = {
-  value: false,
+  defaultValue: 'on',
+  storageKey,
 };
-- 
cgit v1.2.3

