@@ -12,6 +12,8 @@ import { parseCSSVarId } from '../column.utils';
12
12
import { type MRT_TableInstance , type MRT_Virtualizer } from '../types' ;
13
13
import { funcValue , styleValue } from '../funcValue' ;
14
14
15
+ import classes from './MRT_Table.module.css' ;
16
+
15
17
interface Props < TData extends Record < string , any > = { } > {
16
18
table : MRT_TableInstance < TData > ;
17
19
}
@@ -142,24 +144,14 @@ export const MRT_Table = <TData extends Record<string, any> = {}>({
142
144
143
145
return (
144
146
< Table
147
+ className = { classes . root }
145
148
highlightOnHover
146
149
horizontalSpacing = { density }
147
150
verticalSpacing = { density }
148
151
{ ...tableProps }
152
+ data-layout = { layoutMode }
153
+ { ...( enableColumnResizing ? { 'data-column-resizing' : true } : null ) }
149
154
style = { ( theme ) => ( {
150
- display : layoutMode === 'grid' ? 'grid' : 'table' ,
151
- tableLayout :
152
- layoutMode !== 'grid' && enableColumnResizing ? 'fixed' : undefined ,
153
- '& tr:first-of-type td' : {
154
- borderTop : `1px solid ${
155
- theme . colors . gray [ 8 ] // TODO: [theme.colorScheme === 'dark' ? 8 : 3]
156
- } `,
157
- } ,
158
- '& tr:last-of-type td' : {
159
- borderBottom : `1px solid ${
160
- theme . colors . gray [ 8 ] // TODO: [theme.colorScheme === 'dark' ? 8 : 3]
161
- } `,
162
- } ,
163
155
...columnSizeVars ,
164
156
...styleValue ( tableProps , theme ) ,
165
157
} ) }
0 commit comments