mirror of
https://github.com/immich-app/immich.git
synced 2025-06-20 05:58:46 -04:00
* fix: escape shortcut * feat: more escape scenarios * feat: more escape shortcuts --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
26 lines
638 B
Svelte
26 lines
638 B
Svelte
<script lang="ts">
|
|
import { clickOutside } from '../../utils/click-outside';
|
|
import { createEventDispatcher } from 'svelte';
|
|
import { fade } from 'svelte/transition';
|
|
|
|
const dispatch = createEventDispatcher<{
|
|
clickOutside: void;
|
|
escape: void;
|
|
}>();
|
|
</script>
|
|
|
|
<section
|
|
in:fade={{ duration: 100 }}
|
|
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')}
|
|
on:escape={() => dispatch('escape')}
|
|
>
|
|
<slot />
|
|
</div>
|
|
</section>
|