summary.js 728 B

12345678910111213141516171819202122232425262728
  1. import { unit } from '@ant-design/cssinjs';
  2. const genSummaryStyle = token => {
  3. const {
  4. componentCls,
  5. lineWidth,
  6. tableBorderColor,
  7. calc
  8. } = token;
  9. const tableBorder = `${unit(lineWidth)} ${token.lineType} ${tableBorderColor}`;
  10. return {
  11. [`${componentCls}-wrapper`]: {
  12. [`${componentCls}-summary`]: {
  13. position: 'relative',
  14. zIndex: token.zIndexTableFixed,
  15. background: token.tableBg,
  16. '> tr': {
  17. '> th, > td': {
  18. borderBottom: tableBorder
  19. }
  20. }
  21. },
  22. [`div${componentCls}-summary`]: {
  23. boxShadow: `0 ${unit(calc(lineWidth).mul(-1).equal())} 0 ${tableBorderColor}`
  24. }
  25. }
  26. };
  27. };
  28. export default genSummaryStyle;