form provider

This commit is contained in:
Jan Prochazka
2021-03-04 10:56:58 +01:00
parent 593e61abb9
commit 7acea0f4ac
7 changed files with 98 additions and 11 deletions

View File

@@ -2,6 +2,7 @@
import FontIcon from '../icons/FontIcon.svelte';
import { closeModal } from './modalTools';
import clickOutside from '../utility/clickOutside';
import keycodes from '../utility/keycodes';
export let fullScreen;
export let noPadding;
@@ -10,6 +11,12 @@
function handleCloseModal() {
closeModal(modalId);
}
function handleEscape(e) {
if (e.keyCode == keycodes.escape) {
closeModal(modalId);
}
}
</script>
<!-- The Modal -->
@@ -31,6 +38,8 @@
</div>
</div>
<svelte:window on:keydown={handleEscape} />
<style>
.bglayer {
position: fixed;