UNPKG

@mantine/hooks

Version:

A collection of 50+ hooks for state and UI management

18 lines (16 loc) 455 B
'use client'; const setScrollParam = ({ axis, parent, distance }) => { if (!parent && typeof document === "undefined") { return; } const method = axis === "y" ? "scrollTop" : "scrollLeft"; if (parent) { parent[method] = distance; } else { const { body, documentElement } = document; body[method] = distance; documentElement[method] = distance; } }; export { setScrollParam }; //# sourceMappingURL=set-scroll-param.mjs.map