mirror of
https://github.com/smartyellow/status.git
synced 2025-01-18 05:27:58 +00:00
Close modal using escape
This commit is contained in:
parent
721d788a5c
commit
a2a11c3bd2
@ -7,8 +7,16 @@
|
|||||||
function close() {
|
function close() {
|
||||||
open = false;
|
open = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function keyup(event) {
|
||||||
|
if (event.key === 'Escape') {
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<svelte:window on:keyup={keyup} />
|
||||||
|
|
||||||
<div class="modal-bg theme-{$settings.theme}" class:open>
|
<div class="modal-bg theme-{$settings.theme}" class:open>
|
||||||
<div class="modal">
|
<div class="modal">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
|
Loading…
Reference in New Issue
Block a user