ant-design/components/table/style/rtl.tsx
MadCcc 5d9cb2e50d
refactor: Optimize theme export and add docs (#38902)
* refactor: Optimize theme export and add docs

* chore: fix lint

* chore: fix lint

* chore: fix lint
2022-11-23 20:22:38 +08:00

40 lines
901 B
TypeScript

import type { CSSObject } from '@ant-design/cssinjs';
import type { GenerateStyle } from '../../theme/internal';
import type { TableToken } from './index';
const genStyle: GenerateStyle<TableToken, CSSObject> = (token) => {
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`]: {
'&::after': {
transform: 'rotate(-90deg)',
},
'&-collapsed::before': {
transform: 'rotate(180deg)',
},
'&-collapsed::after': {
transform: 'rotate(0deg)',
},
},
},
};
};
export default genStyle;