Files
SIRH/frontend/components/AppDrawer.vue
tristan 0cc2b2730a
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
feat : ajout des frais kms + alignment du style de l'application
2026-03-13 16:05:54 +01:00

50 lines
1.3 KiB
Vue

<template>
<div v-if="modelValue" class="fixed inset-0 z-50">
<Transition name="drawer-backdrop">
<div class="absolute inset-0 bg-black/40" @click="close" />
</Transition>
<Transition name="drawer-panel">
<div class="absolute right-0 top-0 h-full w-full max-w-md bg-white shadow-xl">
<div class="flex items-center justify-between px-[20px] pt-8 pb-8">
<h2 class="text-[32px] font-semibold text-primary-500">
{{ title }}
</h2>
</div>
<div class="overflow-y-auto px-[20px]" style="max-height: calc(100% - 65px)">
<slot />
</div>
</div>
</Transition>
</div>
</template>
<script setup lang="ts">
const props = defineProps<{ modelValue: boolean; title?: string }>()
const emit = defineEmits<{ (e: 'update:modelValue', value: boolean): void }>()
const close = () => emit('update:modelValue', false)
</script>
<style scoped>
.drawer-backdrop-enter-active,
.drawer-backdrop-leave-active {
transition: opacity 0.2s ease;
}
.drawer-backdrop-enter-from,
.drawer-backdrop-leave-to {
opacity: 0;
}
.drawer-panel-enter-active,
.drawer-panel-leave-active {
transition: transform 0.2s ease, opacity 0.2s ease;
}
.drawer-panel-enter-from,
.drawer-panel-leave-to {
transform: translateX(100%);
opacity: 0;
}
</style>