import {
forwardRef,
HTMLAttributes,
TdHTMLAttributes,
ThHTMLAttributes,
} from "react";
import { cn } from "@/lib/utils";
const Table = forwardRef>(
({ className, ...props }, ref) => (
),
);
Table.displayName = "Table";
const TableHeader = forwardRef<
HTMLTableSectionElement,
HTMLAttributes
>(({ className, ...props }, ref) => (
tr]:first:rounded-lg", className)}
{...props}
/>
));
TableHeader.displayName = "TableHeader";
const TableBody = forwardRef<
HTMLTableSectionElement,
HTMLAttributes
>(({ className, ...props }, ref) => (
tr:last-child>td]:after:hidden", className)}
{...props}
/>
));
TableBody.displayName = "TableBody";
const TableFooter = forwardRef<
HTMLTableSectionElement,
HTMLAttributes
>(({ className, ...props }, ref) => (
tr]:last:border-b-0",
className,
)}
{...props}
/>
));
TableFooter.displayName = "TableFooter";
const TableRow = forwardRef<
HTMLTableRowElement,
HTMLAttributes
>(({ className, ...props }, ref) => (
td:first-child]:rounded-l-full [&>td:last-child]:rounded-r-full",
"hover:bg-bg-neutral-tertiary",
"data-[state=selected]:bg-bg-neutral-tertiary",
className,
)}
{...props}
/>
));
TableRow.displayName = "TableRow";
const TableHead = forwardRef<
HTMLTableCellElement,
ThHTMLAttributes
>(({ className, ...props }, ref) => (
|
));
TableHead.displayName = "TableHead";
const TableCell = forwardRef<
HTMLTableCellElement,
TdHTMLAttributes
>(({ className, ...props }, ref) => (
|
));
TableCell.displayName = "TableCell";
const TableCaption = forwardRef<
HTMLTableCaptionElement,
HTMLAttributes
>(({ className, ...props }, ref) => (
));
TableCaption.displayName = "TableCaption";
export {
Table,
TableBody,
TableCaption,
TableCell,
TableFooter,
TableHead,
TableHeader,
TableRow,
};