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) => {
|
2022-09-08 17:20:51 +08:00
|
|
|
const { componentCls, stepsIconCustomTop, stepsIconCustomSize, stepsIconCustomFontSize } = 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`]: {
|
|
|
|
top: stepsIconCustomTop,
|
|
|
|
width: stepsIconCustomSize,
|
|
|
|
height: stepsIconCustomSize,
|
|
|
|
fontSize: stepsIconCustomFontSize,
|
|
|
|
lineHeight: `${stepsIconCustomSize}px`,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// Only adjust horizontal customize icon width
|
|
|
|
[`&:not(${componentCls}-vertical)`]: {
|
|
|
|
[`${componentCls}-item-custom`]: {
|
|
|
|
[`${componentCls}-item-icon`]: {
|
|
|
|
width: 'auto',
|
|
|
|
background: 'none',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export default genStepsCustomIconStyle;
|