@@ -27,12 +27,12 @@ export const Table = forwardRef<HTMLTableElement, TableProps>(({ className, ...p
2727 return (
2828 < div className = "relative overflow-auto" >
2929 < table
30- ref = { ref }
3130 className = { clsx (
3231 'w-full caption-bottom border-collapse border-spacing-0 font-(family-name:--table-font-family,var(--font-family-body)) text-sm' ,
3332 className ,
3433 ) }
3534 { ...props }
35+ ref = { ref }
3636 />
3737 </ div >
3838 ) ;
@@ -47,12 +47,12 @@ export const TableHeader = forwardRef<HTMLTableSectionElement, TableHeaderProps>
4747 ( { className, ...props } , ref ) => {
4848 return (
4949 < thead
50- ref = { ref }
5150 className = { clsx (
5251 'bg-(--table-header-background,var(--contrast-50)) [&_tr]:border-b [&_tr]:border-(--table-border,var(--contrast-200))' ,
5352 className ,
5453 ) }
5554 { ...props }
55+ ref = { ref }
5656 />
5757 ) ;
5858 } ,
@@ -65,7 +65,7 @@ export type TableBodyProps = ComponentPropsWithRef<'tbody'> & {
6565
6666export const TableBody = forwardRef < HTMLTableSectionElement , TableBodyProps > (
6767 ( { className, ...props } , ref ) => {
68- return < tbody ref = { ref } className = { clsx ( '[&_tr:last-child]:border-0' , className ) } { ...props } /> ;
68+ return < tbody className = { clsx ( '[&_tr:last-child]:border-0' , className ) } { ...props } ref = { ref } /> ;
6969 } ,
7070) ;
7171TableBody . displayName = 'TableBody' ;
@@ -78,12 +78,12 @@ export const TableFooter = forwardRef<HTMLTableSectionElement, TableFooterProps>
7878 ( { className, ...props } , ref ) => {
7979 return (
8080 < tfoot
81- ref = { ref }
8281 className = { clsx (
8382 'border-t border-(--table-border,var(--contrast-200)) bg-(--table-header-background,var(--contrast-50)) font-medium [&>tr]:last:border-b-0' ,
8483 className ,
8584 ) }
8685 { ...props }
86+ ref = { ref }
8787 />
8888 ) ;
8989 } ,
@@ -98,12 +98,12 @@ export const TableRow = forwardRef<HTMLTableRowElement, TableRowProps>(
9898 ( { className, ...props } , ref ) => {
9999 return (
100100 < tr
101- ref = { ref }
102101 className = { clsx (
103102 'border-b border-(--table-border,var(--contrast-200)) bg-(--table-row-background,var(--background)) text-(--table-row-text,var(--foreground)) transition-colors hover:bg-(--table-row-background-hover,var(--contrast-50)) data-[state=selected]:bg-(--table-row-background-hover,var(--contrast-50))' ,
104103 className ,
105104 ) }
106105 { ...props }
106+ ref = { ref }
107107 />
108108 ) ;
109109 } ,
@@ -118,12 +118,12 @@ export const TableHead = forwardRef<HTMLTableCellElement, TableHeadProps>(
118118 ( { className, ...props } , ref ) => {
119119 return (
120120 < th
121- ref = { ref }
122121 className = { clsx (
123122 'h-12 px-(--table-cell-padding,0.75rem) text-left align-middle font-medium text-(--table-header-text,var(--foreground)) [&:has([role=checkbox])]:pr-0' ,
124123 className ,
125124 ) }
126125 { ...props }
126+ ref = { ref }
127127 />
128128 ) ;
129129 } ,
@@ -138,12 +138,12 @@ export const TableCell = forwardRef<HTMLTableCellElement, TableCellProps>(
138138 ( { className, ...props } , ref ) => {
139139 return (
140140 < td
141- ref = { ref }
142141 className = { clsx (
143142 'p-(--table-cell-padding,0.75rem) align-middle text-(--table-row-text,var(--foreground)) [&:has([role=checkbox])]:pr-0' ,
144143 className ,
145144 ) }
146145 { ...props }
146+ ref = { ref }
147147 />
148148 ) ;
149149 } ,
@@ -158,9 +158,9 @@ export const TableCaption = forwardRef<HTMLTableCaptionElement, TableCaptionProp
158158 ( { className, ...props } , ref ) => {
159159 return (
160160 < caption
161- ref = { ref }
162161 className = { clsx ( 'mt-4 text-sm text-(--table-row-text,var(--foreground))' , className ) }
163162 { ...props }
163+ ref = { ref }
164164 />
165165 ) ;
166166 } ,
0 commit comments