mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 11:39:28 +08:00
a1f77f3694
* feat: Table support cssVar * fix: fix * fix: fix * Update check-cssinjs.tsx Signed-off-by: lijianan <574980606@qq.com> * Update components/table/style/fixed.ts Co-authored-by: MadCcc <madccc@foxmail.com> Signed-off-by: lijianan <574980606@qq.com> * fix: fix * fix: fix * fix: fix * fix: fix * fix: fix * fix: fix * fix: fix * fix: fix * feat: optimize token * chore: update --------- Signed-off-by: lijianan <574980606@qq.com> Co-authored-by: MadCcc <madccc@foxmail.com> Co-authored-by: MadCcc <1075746765@qq.com>
30 lines
879 B
TypeScript
30 lines
879 B
TypeScript
import { unit, type CSSObject } from '@ant-design/cssinjs';
|
|
|
|
import type { GenerateStyle } from '../../theme/internal';
|
|
import type { TableToken } from './index';
|
|
|
|
const genSummaryStyle: GenerateStyle<TableToken, CSSObject> = (token) => {
|
|
const { componentCls, lineWidth, tableBorderColor, calc } = token;
|
|
const tableBorder = `${unit(lineWidth)} ${token.lineType} ${tableBorderColor}`;
|
|
return {
|
|
[`${componentCls}-wrapper`]: {
|
|
[`${componentCls}-summary`]: {
|
|
position: 'relative',
|
|
zIndex: token.zIndexTableFixed,
|
|
background: token.tableBg,
|
|
'> tr': {
|
|
'> th, > td': {
|
|
borderBottom: tableBorder,
|
|
},
|
|
},
|
|
},
|
|
|
|
[`div${componentCls}-summary`]: {
|
|
boxShadow: `0 ${unit(calc(lineWidth).mul(-1).equal())} 0 ${tableBorderColor}`,
|
|
},
|
|
},
|
|
};
|
|
};
|
|
|
|
export default genSummaryStyle;
|