ant-design/components/table/style/summary.ts
lijianan a1f77f3694
feat: Table support cssVar (#45856)
* 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>
2023-11-17 13:46:41 +08:00

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;