diff options
Diffstat (limited to 'src/utils/hooks/use-reduced-motion/use-reduced-motion.ts')
| -rw-r--r-- | src/utils/hooks/use-reduced-motion/use-reduced-motion.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/utils/hooks/use-reduced-motion/use-reduced-motion.ts b/src/utils/hooks/use-reduced-motion/use-reduced-motion.ts new file mode 100644 index 0000000..2937b75 --- /dev/null +++ b/src/utils/hooks/use-reduced-motion/use-reduced-motion.ts @@ -0,0 +1,9 @@ +import { useContext } from 'react'; +import { MotionContext } from '../../providers/motion-provider'; + +export const useReducedMotion = () => { + const { isReduced, setIsReduced, toggleReducedMotion } = + useContext(MotionContext); + + return { isReduced, setIsReduced, toggleReducedMotion }; +}; |
