Skip to content
File

Blob: ui/shared/ScrollRegion.svelte

618 bytes
1<script lang="ts">
2 import type { Snippet } from 'svelte';
3 import type { HTMLAttributes } from 'svelte/elements';
4 
5 type Props = {
6 label: string;
7 class?: HTMLAttributes<HTMLDivElement>['class'];
8 children: Snippet;
9 };
10 
11 let { label, class: className, children }: Props = $props();
12</script>
13 
14<!-- svelte-ignore a11y_no_noninteractive_tabindex (Keyboard users need to focus overflowing tables to scroll them.) -->
15<div
16 class={['relative w-full max-w-full overflow-x-auto rounded-md border border-line', className]}
17 role="region"
18 aria-label={label}
19 tabindex="0"
20>
21 {@render children()}
22</div>