2022-05-21 02:23:55 -05:00
|
|
|
<script lang="ts">
|
2022-07-15 23:18:17 -05:00
|
|
|
import { clickOutside } from '../../utils/click-outside';
|
2022-05-21 02:23:55 -05:00
|
|
|
import { createEventDispatcher } from 'svelte';
|
|
|
|
import { fade } from 'svelte/transition';
|
|
|
|
|
|
|
|
const dispatch = createEventDispatcher();
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<section
|
|
|
|
in:fade={{ duration: 100 }}
|
|
|
|
out:fade={{ duration: 100 }}
|
2022-12-09 15:51:42 -05:00
|
|
|
class="absolute left-0 top-0 w-full h-full bg-black/40 z-[100] flex place-items-center place-content-center"
|
2022-05-21 02:23:55 -05:00
|
|
|
>
|
2022-07-15 23:18:17 -05:00
|
|
|
<div class="z-[9999]" use:clickOutside on:out-click={() => dispatch('clickOutside')}>
|
2022-05-21 02:23:55 -05:00
|
|
|
<slot />
|
|
|
|
</div>
|
|
|
|
</section>
|