summaryrefslogtreecommitdiff
path: root/frontend/src/lib/components/ui/table/table.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/lib/components/ui/table/table.svelte')
-rw-r--r--frontend/src/lib/components/ui/table/table.svelte17
1 files changed, 17 insertions, 0 deletions
diff --git a/frontend/src/lib/components/ui/table/table.svelte b/frontend/src/lib/components/ui/table/table.svelte
new file mode 100644
index 0000000..b2b477f
--- /dev/null
+++ b/frontend/src/lib/components/ui/table/table.svelte
@@ -0,0 +1,17 @@
+<script lang="ts">
+ import { cn, type WithElementRef } from "$lib/utils.js";
+ import type { HTMLTableAttributes } from "svelte/elements";
+
+ let {
+ ref = $bindable(null),
+ class: className,
+ children,
+ ...restProps
+ }: WithElementRef<HTMLTableAttributes> = $props();
+</script>
+
+<div data-slot="table-container" class="relative w-full overflow-x-auto">
+ <table bind:this={ref} data-slot="table" class={cn("w-full caption-bottom text-xs", className)} {...restProps}>
+ {@render children?.()}
+ </table>
+</div>