mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix(web): escape shortcut (#3753)
* fix: escape shortcut * feat: more escape scenarios * feat: more escape shortcuts --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
parent
8873c9a02f
commit
f63d6d5b67
21 changed files with 140 additions and 27 deletions
|
|
@ -3,7 +3,10 @@
|
|||
import { createEventDispatcher } from 'svelte';
|
||||
import { fade } from 'svelte/transition';
|
||||
|
||||
const dispatch = createEventDispatcher<{ clickOutside: void }>();
|
||||
const dispatch = createEventDispatcher<{
|
||||
clickOutside: void;
|
||||
escape: void;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<section
|
||||
|
|
@ -11,7 +14,12 @@
|
|||
out:fade={{ duration: 100 }}
|
||||
class="fixed left-0 top-0 z-[990] flex h-screen w-screen place-content-center place-items-center bg-black/40"
|
||||
>
|
||||
<div class="z-[9999]" use:clickOutside on:outclick={() => dispatch('clickOutside')}>
|
||||
<div
|
||||
class="z-[9999]"
|
||||
use:clickOutside
|
||||
on:outclick={() => dispatch('clickOutside')}
|
||||
on:escape={() => dispatch('escape')}
|
||||
>
|
||||
<slot />
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue