refac: styling

This commit is contained in:
Timothy J. Baek committed 2024-06-18 15:39:50 -07:00
1 parent d5a1030000
commit 35026849df
3 files changed
+13 -13

No files matched your search

+8 -8
View File
@@ -33,14 +33,14 @@
mounted = true;
});
$: if (mounted) {
if (show) {
window.addEventListener('keydown', handleKeyDown);
document.body.style.overflow = 'hidden';
} else {
window.removeEventListener('keydown', handleKeyDown);
document.body.style.overflow = 'unset';
}
$: if (show && modalElement) {
document.body.appendChild(modalElement);
window.addEventListener('keydown', handleKeyDown);
document.body.style.overflow = 'hidden';
} else if (modalElement) {
document.body.removeChild(modalElement);
window.removeEventListener('keydown', handleKeyDown);
document.body.style.overflow = 'unset';
}
</script>