import { ComponentPropsWithRef, forwardRef } from 'react' import { cn } from 'ui' import { Table as ShadcnTable, TableBody as ShadcnTableBody, TableCaption as ShadcnTableCaption, TableCell as ShadcnTableCell, TableFooter as ShadcnTableFooter, TableHead as ShadcnTableHead, TableHeader as ShadcnTableHeader, TableRow as ShadcnTableRow, } from 'ui/src/components/shadcn/ui/table' // Only create a custom component for Table with the added props const Table = forwardRef>( ({ className, onScroll, ...props }, ref) => ( ) ) Table.displayName = 'Table' const TableHeader = forwardRef< HTMLTableSectionElement, ComponentPropsWithRef >(({ className, ...props }, ref) => ( )) TableHeader.displayName = 'TableHeader' const TableBody = forwardRef< HTMLTableSectionElement, ComponentPropsWithRef >(({ className, ...props }, ref) => ( )) TableBody.displayName = 'TableBody' const TableFooter = forwardRef< HTMLTableSectionElement, ComponentPropsWithRef >(({ className, ...props }, ref) => ( )) TableFooter.displayName = 'TableFooter' const TableRow = forwardRef>( ({ className, ...props }, ref) => ( ) ) TableRow.displayName = 'TableRow' const TableHead = forwardRef>( ({ className, ...props }, ref) => ( .cursor-col-resize]:last:opacity-0', 'text-muted-foreground h-8 px-2 text-left align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]', className )} {...props} /> ) ) TableHead.displayName = 'TableHead' const TableCell = forwardRef>( ({ className, ...props }, ref) => ( [role=checkbox]]:translate-y-[2px] truncate', className)} {...props} /> ) ) TableCell.displayName = 'TableCell' const TableCaption = forwardRef< HTMLTableCaptionElement, ComponentPropsWithRef >(({ className, ...props }, ref) => ( )) TableCaption.displayName = 'TableCaption' export { Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow }