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