chore: add state and undefined to bindings

This commit is contained in:
2024-08-05 23:27:46 +02:00
parent d3d7193663
commit 89fa888616
11 changed files with 14 additions and 14 deletions

View File

@@ -35,7 +35,7 @@
let scrollY = $state<number>()
let innerWidth = $state<number>()
let innerHeight = $state<number>()
let titleEl: HTMLElement
let titleEl = $state<HTMLElement>(undefined)
// Check if title is larger than viewport to translate it
const isLarger = $derived<boolean>(titleEl && titleEl.offsetWidth >= innerWidth)