📚 Documentação inicial do ALETHEIA
- MANUAL-PRODUTO.md: Manual do usuário final - MANUAL-VENDAS.md: Estratégia comercial e vendas - MANUAL-TECNICO.md: Infraestrutura e deploy - README.md: Visão geral do projeto
This commit is contained in:
23
frontend/node_modules/framer-motion/dist/es/utils/use-in-view.mjs
generated
vendored
Normal file
23
frontend/node_modules/framer-motion/dist/es/utils/use-in-view.mjs
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { inView } from '../render/dom/viewport/index.mjs';
|
||||
|
||||
function useInView(ref, { root, margin, amount, once = false } = {}) {
|
||||
const [isInView, setInView] = useState(false);
|
||||
useEffect(() => {
|
||||
if (!ref.current || (once && isInView))
|
||||
return;
|
||||
const onEnter = () => {
|
||||
setInView(true);
|
||||
return once ? undefined : () => setInView(false);
|
||||
};
|
||||
const options = {
|
||||
root: (root && root.current) || undefined,
|
||||
margin,
|
||||
amount,
|
||||
};
|
||||
return inView(ref.current, onEnter, options);
|
||||
}, [root, ref, margin, once, amount]);
|
||||
return isInView;
|
||||
}
|
||||
|
||||
export { useInView };
|
||||
Reference in New Issue
Block a user