2022-05-31 10:10:35 +08:00
|
|
|
import type { CSSObject } from '@ant-design/cssinjs';
|
2022-11-23 20:22:38 +08:00
|
|
|
import type { GenerateStyle } from '../../theme/internal';
|
2022-05-31 10:10:35 +08:00
|
|
|
import type { TableToken } from './index';
|
|
|
|
|
2022-11-19 13:47:33 +08:00
|
|
|
const genSummaryStyle: GenerateStyle<TableToken, CSSObject> = (token) => {
|
2022-11-01 15:06:38 +08:00
|
|
|
const { componentCls, lineWidth, tableBorderColor } = token;
|
|
|
|
const tableBorder = `${lineWidth}px ${token.lineType} ${tableBorderColor}`;
|
2022-05-31 10:10:35 +08:00
|
|
|
return {
|
|
|
|
[`${componentCls}-wrapper`]: {
|
|
|
|
[`${componentCls}-summary`]: {
|
|
|
|
position: 'relative',
|
|
|
|
zIndex: token.zIndexTableFixed,
|
|
|
|
background: token.tableBg,
|
|
|
|
|
|
|
|
'> tr': {
|
|
|
|
'> th, > td': {
|
|
|
|
borderBottom: tableBorder,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
[`div${componentCls}-summary`]: {
|
2022-11-01 15:06:38 +08:00
|
|
|
boxShadow: `0 -${lineWidth}px 0 ${tableBorderColor}`,
|
2022-05-31 10:10:35 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export default genSummaryStyle;
|