| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- "use strict";
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
- const genSizeStyle = token => {
- const {
- componentCls
- } = token;
- const getSizeStyle = (size, paddingVertical, paddingHorizontal, fontSize) => ({
- [`${componentCls}${componentCls}-${size}`]: {
- fontSize,
- [`
- ${componentCls}-title,
- ${componentCls}-footer,
- ${componentCls}-thead > tr > th,
- ${componentCls}-tbody > tr > td,
- tfoot > tr > th,
- tfoot > tr > td
- `]: {
- padding: `${paddingVertical}px ${paddingHorizontal}px`
- },
- [`${componentCls}-filter-trigger`]: {
- marginInlineEnd: `-${paddingHorizontal / 2}px`
- },
- [`${componentCls}-expanded-row-fixed`]: {
- margin: `-${paddingVertical}px -${paddingHorizontal}px`
- },
- [`${componentCls}-tbody`]: {
- // ========================= Nest Table ===========================
- [`${componentCls}-wrapper:only-child ${componentCls}`]: {
- marginBlock: `-${paddingVertical}px`,
- marginInline: `${token.tableExpandColumnWidth - paddingHorizontal}px -${paddingHorizontal}px`
- }
- },
- // https://github.com/ant-design/ant-design/issues/35167
- [`${componentCls}-selection-column`]: {
- paddingInlineStart: `${paddingHorizontal / 4}px`
- }
- }
- });
- return {
- [`${componentCls}-wrapper`]: (0, _extends2.default)((0, _extends2.default)({}, getSizeStyle('middle', token.tablePaddingVerticalMiddle, token.tablePaddingHorizontalMiddle, token.tableFontSizeMiddle)), getSizeStyle('small', token.tablePaddingVerticalSmall, token.tablePaddingHorizontalSmall, token.tableFontSizeSmall))
- };
- };
- var _default = exports.default = genSizeStyle;
|