Files
claddcn-svelte/registry/ui/table/table-row.svelte
T
2026-09-22 02:24:49 +02:00

24 lines
590 B
Svelte

<script lang="ts">
import { cn, type WithElementRef } from '$lib/utils.js';
import type { HTMLAttributes } from 'svelte/elements';
let {
ref = $bindable(null),
class: className,
children,
...restProps
}: WithElementRef<HTMLAttributes<HTMLTableRowElement>> = $props();
</script>
<tr
bind:this={ref}
data-slot="table-row"
class={cn(
'border-b border-cladd-bg-outline transition-colors duration-200 data-[state=selected]:bg-cladd-surface-hover hover:[&,&>svelte-css-wrapper]:[&>th,td]:bg-cladd-surface-hover',
className
)}
{...restProps}
>
{@render children?.()}
</tr>