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 export const Table = forwardRef>( ({ className, onScroll, ...props }, ref) => ( table]:table-fixed', }} /> ) ) Table.displayName = 'Table' export const TableHeader = forwardRef< HTMLTableSectionElement, ComponentPropsWithRef >(({ className, ...props }, ref) => ( )) TableHeader.displayName = 'TableHeader' export const TableBody = forwardRef< HTMLTableSectionElement, ComponentPropsWithRef >(({ className, ...props }, ref) => ( )) TableBody.displayName = 'TableBody' export const TableFooter = forwardRef< HTMLTableSectionElement, ComponentPropsWithRef >(({ className, ...props }, ref) => ( )) TableFooter.displayName = 'TableFooter' export const TableRow = forwardRef< HTMLTableRowElement, ComponentPropsWithRef >(({ className, ...props }, ref) => ( )) TableRow.displayName = 'TableRow' export const TableHead = forwardRef< HTMLTableCellElement, ComponentPropsWithRef >(({ className, ...props }, ref) => ( .cursor-col-resize]:last:opacity-0', 'text-muted-foreground h-9 px-2 text-left align-middle [&:has([role=checkbox])]:pr-0 *:[[role=checkbox]]:translate-y-[2px]', className )} {...props} /> )) TableHead.displayName = 'TableHead' export const TableCell = forwardRef< HTMLTableCellElement, ComponentPropsWithRef >(({ className, ...props }, ref) => ( )) TableCell.displayName = 'TableCell' export const TableCaption = forwardRef< HTMLTableCaptionElement, ComponentPropsWithRef >(({ className, ...props }, ref) => ( )) TableCaption.displayName = 'TableCaption'