fix type error

This commit is contained in:
Theis Pieter Hollebeek 2023-02-08 12:12:14 +01:00 committed by SimonFJ20
parent aeccce0f89
commit f8a99113bf

View File

@ -2,7 +2,8 @@
export function setTopbarOffset() { export function setTopbarOffset() {
const height = document.getElementById("topbar")!.getBoundingClientRect().height; const height = document.getElementById("topbar")!.getBoundingClientRect().height;
document.querySelector(":root")!.style = `--topbar-offset: ${height}px;` const root: HTMLElement = document.querySelector(":root")!;
root.style.setProperty("--topbar-offset", `${height}px`);
} }
export function addToggleDropdownListener() { export function addToggleDropdownListener() {