fix(ui): navbar needs 4 more px added to body padding-top

This commit is contained in:
Łukasz Mierzwa
2020-03-29 16:48:10 +01:00
parent a2b298f87f
commit bd80bd3b4a
2 changed files with 3 additions and 3 deletions

View File

@@ -89,7 +89,7 @@ const NavBar = observer(
updateBodyPaddingTop = () => {
const paddingTop = this.activityStatus.idle
? 0
: this.elementSize.height + 4;
: this.elementSize.height + 8;
document.body.style.paddingTop = `${paddingTop}px`;
};

View File

@@ -116,14 +116,14 @@ describe("<NavBar />", () => {
window
.getComputedStyle(document.body, null)
.getPropertyValue("padding-top")
).toBe("14px");
).toBe("18px");
tree.instance().onResize(0, 36);
expect(
window
.getComputedStyle(document.body, null)
.getPropertyValue("padding-top")
).toBe("40px");
).toBe("44px");
});
});