Skip to content

Commit b94e3f0

Browse files
committed
Allow props on tr
1 parent 4f48b07 commit b94e3f0

File tree

1 file changed

+4
-3
lines changed
  • apps/webapp/app/components/primitives

1 file changed

+4
-3
lines changed

apps/webapp/app/components/primitives/Table.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ChevronRightIcon } from "@heroicons/react/24/solid";
22
import { Link } from "@remix-run/react";
33
import { ClipboardCheckIcon, ClipboardIcon } from "lucide-react";
4-
import React, { type ReactNode, forwardRef, useState, useContext, createContext } from "react";
4+
import React, { type ReactNode, createContext, forwardRef, useContext, useState } from "react";
55
import { useCopy } from "~/hooks/useCopy";
66
import { cn } from "~/utils/cn";
77
import { Popover, PopoverContent, PopoverVerticalEllipseTrigger } from "./Popover";
@@ -106,19 +106,20 @@ export const TableBody = forwardRef<HTMLTableSectionElement, TableBodyProps>(
106106
}
107107
);
108108

109-
type TableRowProps = {
109+
type TableRowProps = JSX.IntrinsicElements["tr"] & {
110110
className?: string;
111111
children: ReactNode;
112112
disabled?: boolean;
113113
isSelected?: boolean;
114114
};
115115

116116
export const TableRow = forwardRef<HTMLTableRowElement, TableRowProps>(
117-
({ className, disabled, isSelected, children }, ref) => {
117+
({ className, disabled, isSelected, children, ...props }, ref) => {
118118
const { variant } = useContext(TableContext);
119119
return (
120120
<tr
121121
ref={ref}
122+
{...props}
122123
className={cn(
123124
"group/table-row relative w-full outline-none after:absolute after:bottom-0 after:left-3 after:right-0 after:h-px after:bg-grid-dimmed",
124125
isSelected && variants[variant].rowSelected,

0 commit comments

Comments
 (0)