calculate hidden navbar top

pull/712/head
Anton Mushnin 2022-11-19 12:28:44 +03:00
rodzic 779be7c23a
commit 224610088a
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -27,10 +27,11 @@ const Scrollable = (props) => {
}
}
const navbar = document.getElementById("Navbar");
if (dir === -1) {
document.getElementById("Navbar").style.top = "-48px";
navbar.style.top = `${-navbar.offsetHeight}px`;
} else {
document.getElementById("Navbar").style.top = "-0";
navbar.style.top = "-0";
}
setY(currentScroll);
if (currentScroll > scrollDepth) {
@ -69,6 +70,7 @@ const Scrollable = (props) => {
ref={scrollerRef}
overflowY="scroll"
onScroll={(e) => handleScroll(e)}
// pt="72px"
>
{props.children}
</Box>