From 757201fdc5c04a3f15504f74bf8ab85bb6018c2b Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Fri, 27 Oct 2023 11:09:38 +0200
Subject: refactor(hooks,provider): move reduce motion setter

Since the local storage key is not meant to change between the
components, it should be set directly inside the app file. So
both the local storage and the data attribute should be handle
in a provider.
I also added a custom document because we need a script to
retrieve the stored value in local storage earlier to avoid
flashing on hydration.
---
 .../organisms/modals/settings-modal.stories.tsx           | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

(limited to 'src/components/organisms/modals/settings-modal.stories.tsx')

diff --git a/src/components/organisms/modals/settings-modal.stories.tsx b/src/components/organisms/modals/settings-modal.stories.tsx
index 57ce00f..7c56f27 100644
--- a/src/components/organisms/modals/settings-modal.stories.tsx
+++ b/src/components/organisms/modals/settings-modal.stories.tsx
@@ -1,5 +1,4 @@
 import type { ComponentMeta, ComponentStory } from '@storybook/react';
-import { storageKey as motionStorageKey } from '../forms/motion-toggle/motion-toggle.fixture';
 import { SettingsModal } from './settings-modal';
 
 /**
@@ -22,16 +21,6 @@ export default {
         required: false,
       },
     },
-    motionStorageKey: {
-      control: {
-        type: 'text',
-      },
-      description: 'A local storage key for reduced motion setting..',
-      type: {
-        name: 'string',
-        required: true,
-      },
-    },
     tooltipClassName: {
       control: {
         type: 'text',
@@ -59,6 +48,4 @@ const Template: ComponentStory<typeof SettingsModal> = (args) => (
  * Modals Stories - Settings
  */
 export const Settings = Template.bind({});
-Settings.args = {
-  motionStorageKey,
-};
+Settings.args = {};
-- 
cgit v1.2.3

