2022-05-31 10:10:35 +08:00
|
|
|
import type { CSSObject } from '@ant-design/cssinjs';
|
2022-06-27 14:25:59 +08:00
|
|
|
import type { GenerateStyle } from '../../theme';
|
2022-05-31 10:10:35 +08:00
|
|
|
import type { TableToken } from './index';
|
|
|
|
|
|
|
|
const genSummaryStyle: GenerateStyle<TableToken, CSSObject> = token => {
|
2022-06-02 18:47:14 +08:00
|
|
|
const { componentCls, controlLineWidth, tableBorderColor } = token;
|
|
|
|
const tableBorder = `${controlLineWidth}px ${token.controlLineType} ${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-06-02 18:47:14 +08:00
|
|
|
boxShadow: `0 -${controlLineWidth}px 0 ${tableBorderColor}`,
|
2022-05-31 10:10:35 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export default genSummaryStyle;
|