data type editor

This commit is contained in:
Jan Prochazka
2021-06-17 08:54:11 +02:00
parent 8874589ed0
commit 112f310d13
5 changed files with 78 additions and 3 deletions

View File

@@ -4,6 +4,7 @@
import clickOutside from '../utility/clickOutside';
import keycodes from '../utility/keycodes';
import { onMount } from 'svelte';
import { currentDropDownMenu } from '../stores';
export let fullScreen = false;
export let noPadding = false;
@@ -16,6 +17,11 @@
}
}
function handleClickOutside() {
if ($currentDropDownMenu) return;
handleCloseModal();
}
function handleEscape(e) {
if (e.keyCode == keycodes.escape) {
handleCloseModal();
@@ -28,12 +34,13 @@
if (oldFocus) oldFocus.focus();
};
});
</script>
<!-- The Modal -->
<div id="myModal" class="bglayer">
<!-- Modal content -->
<div class="window" class:fullScreen class:simple use:clickOutside on:clickOutside={handleCloseModal}>
<div class="window" class:fullScreen class:simple use:clickOutside on:clickOutside={handleClickOutside}>
{#if $$slots.header}
<div class="header" class:fullScreen>
<div><slot name="header" /></div>
@@ -153,4 +160,5 @@
border-top: 1px solid var(--theme-border);
background-color: var(--theme-bg-modalheader);
}
</style>