aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/forms
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-05-19 19:46:24 +0200
committerArmand Philippot <git@armandphilippot.com>2022-05-19 19:46:24 +0200
commitbbd63400f94b43fde04449e0c71d14763d893e6a (patch)
tree057055dce19fc71c7c2e2fa05b691144224dfbd0 /src/components/molecules/forms
parent806004ab79ac4e1cb49cef93ab3f35a08c5c82b5 (diff)
refactor: rewrite Prism hooks and providers
It avoid some hydratation errors on project pages (not in article however) and the hooks are now reusable.
Diffstat (limited to 'src/components/molecules/forms')
-rw-r--r--src/components/molecules/forms/motion-toggle.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/components/molecules/forms/motion-toggle.tsx b/src/components/molecules/forms/motion-toggle.tsx
index e3bb11a..cbe38fe 100644
--- a/src/components/molecules/forms/motion-toggle.tsx
+++ b/src/components/molecules/forms/motion-toggle.tsx
@@ -33,7 +33,8 @@ const MotionToggle: FC<MotionToggleProps> = ({
value
);
useAttributes({
- attribute: 'reducedMotion',
+ element: document.documentElement || undefined,
+ attribute: 'reduced-motion',
value: `${isReduced}`,
});