UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

12 lines (11 loc) 519 B
"use client"; import { useIsomorphicEffect } from "@mantine/hooks"; //#region packages/@mantine/core/src/core/MantineProvider/use-respect-reduce-motion/use-respect-reduce-motion.ts function useRespectReduceMotion({ respectReducedMotion, getRootElement }) { useIsomorphicEffect(() => { if (respectReducedMotion) getRootElement()?.setAttribute("data-respect-reduced-motion", "true"); }, [respectReducedMotion]); } //#endregion export { useRespectReduceMotion }; //# sourceMappingURL=use-respect-reduce-motion.mjs.map