flotilla/src/lib/components/Drawer.svelte

18 lines
474 B
Svelte
Raw Normal View History

2024-09-25 22:49:17 +00:00
<script lang="ts">
2024-10-17 21:26:53 +00:00
import {fade, translate} from "@lib/transition"
2024-09-25 22:49:17 +00:00
2024-10-15 22:52:30 +00:00
export let onClose
2024-09-25 22:49:17 +00:00
</script>
<div class="fixed inset-0 z-modal drawer">
2024-10-15 22:52:30 +00:00
<button
class="absolute inset-0 cursor-pointer bg-black opacity-50"
transition:fade
on:click={onClose} />
<div
2024-10-17 21:26:53 +00:00
class="scroll-container absolute bottom-0 right-0 top-0 w-80 overflow-auto bg-base-200 text-base-content lg:w-96"
transition:translate={{axis: "x", duration: 300}}>
2024-10-15 22:52:30 +00:00
<slot />
2024-09-25 22:49:17 +00:00
</div>
</div>