mirror of
https://github.com/maputnik/editor.git
synced 2026-01-21 04:40:02 +00:00
This is to continue the work of migrating all the jsx files into tsx files. The MO is basically described here: #848. About 7 files to go...
9 lines
288 B
TypeScript
9 lines
288 B
TypeScript
import throttle from 'lodash.throttle'
|
|
|
|
// Throttle for 3 seconds so when a user enables it they don't have to refresh the page.
|
|
const reducedMotionEnabled = throttle(() => {
|
|
return window.matchMedia("(prefers-reduced-motion: reduce)").matches
|
|
}, 3000)
|
|
|
|
export { reducedMotionEnabled }
|