2022-05-31 10:10:35 +08:00
|
|
|
import type { CSSObject } from '@ant-design/cssinjs';
|
2024-04-08 14:04:08 +08:00
|
|
|
|
2022-11-23 20:22:38 +08:00
|
|
|
import type { GenerateStyle } from '../../theme/internal';
|
2022-05-31 10:10:35 +08:00
|
|
|
import type { TableToken } from './index';
|
|
|
|
|
2022-11-19 13:47:33 +08:00
|
|
|
const genStyle: GenerateStyle<TableToken, CSSObject> = (token) => {
|
2022-05-31 10:10:35 +08:00
|
|
|
const { componentCls } = token;
|
|
|
|
return {
|
|
|
|
[`${componentCls}-wrapper-rtl`]: {
|
|
|
|
direction: 'rtl',
|
|
|
|
table: {
|
|
|
|
direction: 'rtl',
|
|
|
|
},
|
|
|
|
|
|
|
|
[`${componentCls}-pagination-left`]: {
|
|
|
|
justifyContent: 'flex-end',
|
|
|
|
},
|
|
|
|
|
|
|
|
[`${componentCls}-pagination-right`]: {
|
|
|
|
justifyContent: 'flex-start',
|
|
|
|
},
|
|
|
|
|
|
|
|
[`${componentCls}-row-expand-icon`]: {
|
2023-08-03 12:30:55 +08:00
|
|
|
float: 'right',
|
|
|
|
|
2022-05-31 10:10:35 +08:00
|
|
|
'&::after': {
|
|
|
|
transform: 'rotate(-90deg)',
|
|
|
|
},
|
|
|
|
|
|
|
|
'&-collapsed::before': {
|
|
|
|
transform: 'rotate(180deg)',
|
|
|
|
},
|
|
|
|
|
|
|
|
'&-collapsed::after': {
|
|
|
|
transform: 'rotate(0deg)',
|
|
|
|
},
|
|
|
|
},
|
2023-01-29 20:46:13 +08:00
|
|
|
|
|
|
|
[`${componentCls}-container`]: {
|
|
|
|
'&::before': {
|
|
|
|
insetInlineStart: 'unset',
|
|
|
|
insetInlineEnd: 0,
|
|
|
|
},
|
|
|
|
|
|
|
|
'&::after': {
|
|
|
|
insetInlineStart: 0,
|
|
|
|
insetInlineEnd: 'unset',
|
|
|
|
},
|
2023-08-03 12:30:55 +08:00
|
|
|
|
|
|
|
[`${componentCls}-row-indent`]: {
|
|
|
|
float: 'right',
|
|
|
|
},
|
2023-01-29 20:46:13 +08:00
|
|
|
},
|
2022-05-31 10:10:35 +08:00
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export default genStyle;
|