add Scroll component

This commit is contained in:
Guilhem
2025-03-31 17:07:20 +01:00
parent f6687c782a
commit ef4472cfa0

View File

@@ -0,0 +1,22 @@
<script>
import { twMerge } from 'tailwind-merge'
</script>
<div class={twMerge('h-full w-full overflow-y-auto', $$props.class)}>
<slot />
</div>
<style>
/* Custom scrollbar styles */
div::-webkit-scrollbar {
width: 12px;
}
/* For Firefox */
div {
/* Prevent layout shift from scrollbar appearance */
scrollbar-gutter: stable;
/* Prevent horizontal scrollbar */
overflow-x: hidden;
}
</style>