25
25
*/
26
26
27
27
import type { CompareProps } from '@rc-component/context/lib/Immutable' ;
28
- import cls from 'classnames ' ;
28
+ import { clsx } from 'clsx ' ;
29
29
import ResizeObserver from '@rc-component/resize-observer' ;
30
30
import { getTargetScrollBarSize } from '@rc-component/util/lib/getScrollBarSize' ;
31
31
import useEvent from '@rc-component/util/lib/hooks/useEvent' ;
@@ -779,12 +779,8 @@ const Table = <RecordType extends DefaultRecordType>(
779
779
// >>>>>> Unique table
780
780
groupTableNode = (
781
781
< div
782
- style = { {
783
- ...scrollXStyle ,
784
- ...scrollYStyle ,
785
- ...styles ?. content ,
786
- } }
787
- className = { cls ( `${ prefixCls } -content` , classNames ?. content ) }
782
+ style = { { ...scrollXStyle , ...scrollYStyle , ...styles ?. content } }
783
+ className = { clsx ( `${ prefixCls } -content` , classNames ?. content ) }
788
784
onScroll = { onInternalScroll }
789
785
ref = { scrollBodyRef }
790
786
>
@@ -817,7 +813,7 @@ const Table = <RecordType extends DefaultRecordType>(
817
813
818
814
let fullTable = (
819
815
< div
820
- className = { cls ( prefixCls , className , {
816
+ className = { clsx ( prefixCls , className , {
821
817
[ `${ prefixCls } -rtl` ] : direction === 'rtl' ,
822
818
[ `${ prefixCls } -fix-start-shadow` ] : horizonScroll ,
823
819
[ `${ prefixCls } -fix-end-shadow` ] : horizonScroll ,
@@ -837,19 +833,19 @@ const Table = <RecordType extends DefaultRecordType>(
837
833
{ ...dataProps }
838
834
>
839
835
{ title && (
840
- < Panel className = { cls ( `${ prefixCls } -title` , classNames ?. title ) } style = { styles ?. title } >
836
+ < Panel className = { clsx ( `${ prefixCls } -title` , classNames ?. title ) } style = { styles ?. title } >
841
837
{ title ( mergedData ) }
842
838
</ Panel >
843
839
) }
844
840
< div
845
841
ref = { scrollBodyContainerRef }
846
- className = { cls ( `${ prefixCls } -container` , classNames ?. section ) }
842
+ className = { clsx ( `${ prefixCls } -container` , classNames ?. section ) }
847
843
style = { styles ?. section }
848
844
>
849
845
{ groupTableNode }
850
846
</ div >
851
847
{ footer && (
852
- < Panel className = { cls ( `${ prefixCls } -footer` , classNames ?. footer ) } style = { styles ?. footer } >
848
+ < Panel className = { clsx ( `${ prefixCls } -footer` , classNames ?. footer ) } style = { styles ?. footer } >
853
849
{ footer ( mergedData ) }
854
850
</ Panel >
855
851
) }
0 commit comments