@@ -17,14 +17,25 @@ export interface TableHeadCellTheme {
17
17
export interface TableHeadCellProps extends ComponentPropsWithRef < "th" > , ThemingProps < TableHeadCellTheme > { }
18
18
19
19
export const TableHeadCell = forwardRef < HTMLTableCellElement , TableHeadCellProps > (
20
- ( { children, className, theme : customTheme , resetTheme, ...props } , ref ) => {
21
- const { theme : rootTheme , resetTheme : rootResetTheme } = useTableContext ( ) ;
22
- const { theme : headTheme , resetTheme : headResetTheme } = useTableHeadContext ( ) ;
20
+ ( { children, className, theme : customTheme , resetTheme, applyTheme , ...props } , ref ) => {
21
+ const { theme : rootTheme , resetTheme : rootResetTheme , applyTheme : rootApplyTheme } = useTableContext ( ) ;
22
+ const { theme : headTheme , resetTheme : headResetTheme , applyTheme : headApplyTheme } = useTableHeadContext ( ) ;
23
23
24
24
const provider = useThemeProvider ( ) ;
25
25
const theme = resolveTheme (
26
26
[ tableTheme . head . cell , provider . theme ?. table ?. head ?. cell , rootTheme ?. head ?. cell , headTheme ?. cell , customTheme ] ,
27
- [ get ( rootResetTheme , "head.cell" ) , get ( headResetTheme , "cell" ) , resetTheme ] ,
27
+ [
28
+ get ( provider . resetTheme , "table.head.cell" ) ,
29
+ get ( rootResetTheme , "head.cell" ) ,
30
+ get ( headResetTheme , "cell" ) ,
31
+ resetTheme ,
32
+ ] ,
33
+ [
34
+ get ( provider . applyTheme , "table.head.cell" ) ,
35
+ get ( rootApplyTheme , "head.cell" ) ,
36
+ get ( headApplyTheme , "cell" ) ,
37
+ applyTheme ,
38
+ ] ,
28
39
) ;
29
40
30
41
return (
0 commit comments