You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
2.0 KiB
77 lines
2.0 KiB
3 years ago
|
import type { CSSObject } from '@ant-design/cssinjs';
|
||
2 years ago
|
import type { GenerateStyle } from '../../theme/internal';
|
||
3 years ago
|
import type { TableToken } from './index';
|
||
|
|
||
2 years ago
|
const genSelectionStyle: GenerateStyle<TableToken, CSSObject> = (token) => {
|
||
3 years ago
|
const {
|
||
|
componentCls,
|
||
|
antCls,
|
||
|
iconCls,
|
||
|
fontSizeIcon,
|
||
|
paddingXS,
|
||
|
tableHeaderIconColor,
|
||
|
tableHeaderIconColorHover,
|
||
|
} = token;
|
||
3 years ago
|
return {
|
||
|
[`${componentCls}-wrapper`]: {
|
||
|
// ========================== Selections ==========================
|
||
|
[`${componentCls}-selection-col`]: {
|
||
|
width: token.tableSelectionColumnWidth,
|
||
|
},
|
||
|
|
||
|
[`${componentCls}-bordered ${componentCls}-selection-col`]: {
|
||
3 years ago
|
width: token.tableSelectionColumnWidth + paddingXS * 2,
|
||
3 years ago
|
},
|
||
|
|
||
|
[`
|
||
|
table tr th${componentCls}-selection-column,
|
||
|
table tr td${componentCls}-selection-column
|
||
|
`]: {
|
||
|
paddingInlineEnd: token.paddingXS,
|
||
|
paddingInlineStart: token.paddingXS,
|
||
|
textAlign: 'center',
|
||
|
|
||
|
[`${antCls}-radio-wrapper`]: {
|
||
|
marginInlineEnd: 0,
|
||
|
},
|
||
|
},
|
||
|
|
||
|
[`table tr th${componentCls}-selection-column${componentCls}-cell-fix-left`]: {
|
||
2 years ago
|
zIndex: token.zIndexTableFixed + 1,
|
||
3 years ago
|
},
|
||
|
|
||
|
[`table tr th${componentCls}-selection-column::after`]: {
|
||
|
backgroundColor: 'transparent !important',
|
||
|
},
|
||
|
|
||
|
[`${componentCls}-selection`]: {
|
||
|
position: 'relative',
|
||
|
display: 'inline-flex',
|
||
|
flexDirection: 'column',
|
||
|
},
|
||
|
|
||
|
[`${componentCls}-selection-extra`]: {
|
||
|
position: 'absolute',
|
||
|
top: 0,
|
||
|
zIndex: 1,
|
||
|
cursor: 'pointer',
|
||
|
transition: `all ${token.motionDurationSlow}`,
|
||
|
marginInlineStart: '100%',
|
||
|
paddingInlineStart: `${token.tablePaddingHorizontal / 4}px`,
|
||
|
|
||
|
[iconCls]: {
|
||
3 years ago
|
color: tableHeaderIconColor,
|
||
|
fontSize: fontSizeIcon,
|
||
3 years ago
|
verticalAlign: 'baseline',
|
||
|
|
||
|
'&:hover': {
|
||
3 years ago
|
color: tableHeaderIconColorHover,
|
||
3 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
};
|
||
|
};
|
||
|
|
||
|
export default genSelectionStyle;
|