import { forwardRef } from 'react' import type { 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) => ( )) TableHeader.displayName = 'TableHeader' const TableBody = forwardRef< HTMLTableSectionElement, HTMLAttributes >(({ className, ...props }, ref) => ( )) 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) => ( )) TableRow.displayName = 'TableRow' const TableHead = forwardRef< HTMLTableCellElement, ThHTMLAttributes >(({ className, ...props }, ref) => (
[role=checkbox]]:translate-y-0.5', className )} {...props} /> )) TableHead.displayName = 'TableHead' const TableCell = forwardRef< HTMLTableCellElement, TdHTMLAttributes >(({ className, ...props }, ref) => ( [role=checkbox]]:translate-y-0.5', className)} {...props} /> )) TableCell.displayName = 'TableCell' const TableCaption = forwardRef< HTMLTableCaptionElement, HTMLAttributes >(({ className, ...props }, ref) => (
)) TableCaption.displayName = 'TableCaption' export type TableProps = HTMLAttributes export type TableHeaderProps = HTMLAttributes export type TableBodyProps = HTMLAttributes export type TableFooterProps = HTMLAttributes export type TableRowProps = HTMLAttributes export type TableHeadProps = ThHTMLAttributes export type TableCellProps = TdHTMLAttributes export type TableCaptionProps = HTMLAttributes export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, }