2023-04-16 04:13:09 +02:00
|
|
|
<script lang="ts">
|
2023-06-14 20:39:36 +02:00
|
|
|
import { createEventDispatcher } from "svelte"
|
|
|
|
import { XCircleIcon } from "@rgossiaux/svelte-heroicons/solid"
|
2023-04-16 04:13:09 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The slotted element will be shown on the right side
|
|
|
|
*/
|
2023-06-14 20:39:36 +02:00
|
|
|
const dispatch = createEventDispatcher<{ close }>()
|
2023-04-16 04:13:09 +02:00
|
|
|
</script>
|
|
|
|
|
2023-06-14 20:39:36 +02:00
|
|
|
<div
|
|
|
|
class="absolute top-0 right-0 h-screen overflow-auto w-full md:w-6/12 lg:w-5/12 xl:w-4/12 drop-shadow-2xl"
|
|
|
|
style="max-width: 100vw; max-height: 100vh"
|
|
|
|
>
|
2023-05-06 01:23:55 +02:00
|
|
|
<div class="flex flex-col m-0 normal-background">
|
2023-04-16 04:13:09 +02:00
|
|
|
<slot name="close-button">
|
2023-06-14 20:39:36 +02:00
|
|
|
<div
|
|
|
|
class="w-8 h-8 absolute right-10 top-10 cursor-pointer"
|
|
|
|
on:click={() => dispatch("close")}
|
|
|
|
>
|
2023-04-16 04:13:09 +02:00
|
|
|
<XCircleIcon />
|
|
|
|
</div>
|
|
|
|
</slot>
|
2023-06-14 20:39:36 +02:00
|
|
|
<slot />
|
2023-04-16 04:13:09 +02:00
|
|
|
</div>
|
|
|
|
</div>
|