2022-04-19 11:28:06 +08:00
|
|
|
import type { CSSObject } from '@ant-design/cssinjs';
|
2023-11-17 15:33:28 +08:00
|
|
|
import { unit } from '@ant-design/cssinjs';
|
2024-04-08 14:04:08 +08:00
|
|
|
|
|
|
|
import type { StepsToken } from '.';
|
2022-11-23 20:22:38 +08:00
|
|
|
import type { GenerateStyle } from '../../theme/internal';
|
2022-04-19 11:28:06 +08:00
|
|
|
|
2022-11-19 13:47:33 +08:00
|
|
|
const genStepsCustomIconStyle: GenerateStyle<StepsToken, CSSObject> = (token) => {
|
2023-05-09 19:24:50 +08:00
|
|
|
const { componentCls, customIconTop, customIconSize, customIconFontSize } = token;
|
2022-04-19 11:28:06 +08:00
|
|
|
|
|
|
|
return {
|
|
|
|
[`${componentCls}-item-custom`]: {
|
|
|
|
[`> ${componentCls}-item-container > ${componentCls}-item-icon`]: {
|
|
|
|
height: 'auto',
|
|
|
|
background: 'none',
|
2022-06-01 11:19:05 +08:00
|
|
|
border: 0,
|
2022-04-19 11:28:06 +08:00
|
|
|
[`> ${componentCls}-icon`]: {
|
2023-05-09 19:24:50 +08:00
|
|
|
top: customIconTop,
|
|
|
|
width: customIconSize,
|
|
|
|
height: customIconSize,
|
|
|
|
fontSize: customIconFontSize,
|
2024-08-06 00:04:28 +08:00
|
|
|
lineHeight: unit(customIconSize),
|
2022-04-19 11:28:06 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// Only adjust horizontal customize icon width
|
|
|
|
[`&:not(${componentCls}-vertical)`]: {
|
|
|
|
[`${componentCls}-item-custom`]: {
|
|
|
|
[`${componentCls}-item-icon`]: {
|
|
|
|
width: 'auto',
|
|
|
|
background: 'none',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export default genStepsCustomIconStyle;
|