2022-05-31 10:10:35 +08:00
|
|
|
import type { CSSObject } from '@ant-design/cssinjs';
|
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) => {
|
2022-05-31 10:10:35 +08:00
|
|
|
const { componentCls, antCls } = token;
|
|
|
|
return {
|
|
|
|
[`${componentCls}-wrapper`]: {
|
|
|
|
// ========================== Pagination ==========================
|
|
|
|
[`${componentCls}-pagination${antCls}-pagination`]: {
|
|
|
|
margin: `${token.margin}px 0`,
|
|
|
|
},
|
|
|
|
|
|
|
|
[`${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;
|