2024-04-08 14:04:08 +08:00
|
|
|
import { unit } from '@ant-design/cssinjs';
|
|
|
|
import type { CSSObject } from '@ant-design/cssinjs';
|
2023-11-17 13:46:41 +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 genPaginationStyle: GenerateStyle<TableToken, CSSObject> = (token) => {
|
2023-11-17 13:46:41 +08:00
|
|
|
const { componentCls, antCls, margin } = token;
|
2022-05-31 10:10:35 +08:00
|
|
|
return {
|
|
|
|
[`${componentCls}-wrapper`]: {
|
|
|
|
// ========================== Pagination ==========================
|
|
|
|
[`${componentCls}-pagination${antCls}-pagination`]: {
|
2023-11-17 13:46:41 +08:00
|
|
|
margin: `${unit(margin)} 0`,
|
2022-05-31 10:10:35 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
[`${componentCls}-pagination`]: {
|
|
|
|
display: 'flex',
|
|
|
|
flexWrap: 'wrap',
|
|
|
|
rowGap: token.paddingXS,
|
|
|
|
|
|
|
|
'> *': {
|
|
|
|
flex: 'none',
|
|
|
|
},
|
|
|
|
|
|
|
|
'&-left': {
|
|
|
|
justifyContent: 'flex-start',
|
|
|
|
},
|
|
|
|
|
|
|
|
'&-center': {
|
|
|
|
justifyContent: 'center',
|
|
|
|
},
|
|
|
|
|
|
|
|
'&-right': {
|
|
|
|
justifyContent: 'flex-end',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export default genPaginationStyle;
|