2022-04-19 11:28:06 +08:00
|
|
|
import type { CSSObject } from '@ant-design/cssinjs';
|
|
|
|
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,
|
|
|
|
lineHeight: `${customIconFontSize}px`,
|
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;
|