♻️ refactor: Scroll panel component updated

This commit is contained in:
Paul Valerie GOMA 2025-07-26 14:19:48 +02:00
parent 2c6c693ceb
commit 6f1a6b930c

View File

@ -1,5 +1,5 @@
<script setup lang="ts">
import ScrollPanel from 'primevue';
import ScrollPanel from 'primevue/scrollpanel';
const props = withDefaults(defineProps<{
step?: number
@ -12,5 +12,24 @@ const props = withDefaults(defineProps<{
</script>
<template>
<ScrollPanel :step="props.step" :style="{width: props.width, height: props.height}"/>
<ScrollPanel
:step="props.step"
class="p-scrollpanel-content"
:style="{width: props.width, maxHeight: props.height}"
>
<slot/>
</ScrollPanel>
</template>
<style lang="css" scoped>
*{
margin: 0px;
padding: 0px;
}
.p-scrollpanel {
height: fit-content;
overflow-y: auto;
box-sizing: content-box;
}
</style>