mirror of
https://github.com/cupcakearmy/nicco.io.git
synced 2024-12-22 08:06:29 +00:00
resize on body resize
This commit is contained in:
parent
27e2e41c44
commit
2eb87b2dba
@ -6,8 +6,14 @@
|
||||
export let segment
|
||||
let wrapper
|
||||
|
||||
onMount(() => {
|
||||
function resize() {
|
||||
wrapper.style.height = `${window.innerHeight}px`
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
const listener = window.addEventListener('resize', resize)
|
||||
resize()
|
||||
return () => window.removeEventListener(listener)
|
||||
})
|
||||
</script>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user