summaryrefslogtreecommitdiff
path: root/frontend/src/lib/components/ui/table/table-cell.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/lib/components/ui/table/table-cell.svelte')
-rw-r--r--frontend/src/lib/components/ui/table/table-cell.svelte15
1 files changed, 15 insertions, 0 deletions
diff --git a/frontend/src/lib/components/ui/table/table-cell.svelte b/frontend/src/lib/components/ui/table/table-cell.svelte
new file mode 100644
index 0000000..a998bf6
--- /dev/null
+++ b/frontend/src/lib/components/ui/table/table-cell.svelte
@@ -0,0 +1,15 @@
+<script lang="ts">
+ import { cn, type WithElementRef } from "$lib/utils.js";
+ import type { HTMLTdAttributes } from "svelte/elements";
+
+ let {
+ ref = $bindable(null),
+ class: className,
+ children,
+ ...restProps
+ }: WithElementRef<HTMLTdAttributes> = $props();
+</script>
+
+<td bind:this={ref} data-slot="table-cell" class={cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0", className)} {...restProps}>
+ {@render children?.()}
+</td>