first commit
This commit is contained in:
14
node_modules/framer-motion/dist/es/render/dom/scroll/index.mjs
generated
vendored
Normal file
14
node_modules/framer-motion/dist/es/render/dom/scroll/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { noop } from 'motion-utils';
|
||||
import { attachToAnimation } from './attach-animation.mjs';
|
||||
import { attachToFunction } from './attach-function.mjs';
|
||||
|
||||
function scroll(onScroll, { axis = "y", container = document.scrollingElement, ...options } = {}) {
|
||||
if (!container)
|
||||
return noop;
|
||||
const optionsWithDefaults = { axis, container, ...options };
|
||||
return typeof onScroll === "function"
|
||||
? attachToFunction(onScroll, optionsWithDefaults)
|
||||
: attachToAnimation(onScroll, optionsWithDefaults);
|
||||
}
|
||||
|
||||
export { scroll };
|
||||
Reference in New Issue
Block a user