hoverEffect configuration on TableRow

This commit is contained in:
Oliver Bryan
2025-12-14 18:49:06 +00:00
parent 6f7ffacbb9
commit 4ba7af4dc5
2 changed files with 9 additions and 4 deletions

View File

@@ -30,12 +30,17 @@ function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {
);
}
function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
function TableRow({
className,
hoverEffect = true,
...props
}: React.ComponentProps<"tr"> & { hoverEffect?: boolean }) {
return (
<tr
data-slot="table-row"
className={cn(
"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
"data-[state=selected]:bg-muted border-b transition-colors",
hoverEffect && "hover:bg-muted/40",
className,
)}
{...props}