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

@@ -11,9 +11,9 @@ export function IssuesTable({
return (
<Table>
<TableHeader>
<TableRow>
<TableRow hoverEffect={false}>
{(columns.id == null || columns.id === true) && (
<TableHead className="w-[0px] border-r">ID</TableHead>
<TableHead className="w-[1px] border-r">ID</TableHead>
)}
{(columns.title == null || columns.title === true) && <TableHead>Title</TableHead>}
{(columns.description == null || columns.description === true) && (

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}