mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-03 00:09:39 +08:00
a434ec7614
* refactor: steps full token * refactor: progress dot * refactor: no hard code * refactor: token optimization
48 lines
1.3 KiB
TypeScript
48 lines
1.3 KiB
TypeScript
import type { CSSObject } from '@ant-design/cssinjs';
|
|
import type { StepsToken } from '.';
|
|
import type { GenerateStyle } from '../../_util/theme';
|
|
|
|
const genStepsCustomIconStyle: GenerateStyle<StepsToken, CSSObject> = token => {
|
|
const {
|
|
componentCls,
|
|
stepsIconCustomTop,
|
|
stepsIconCustomSize,
|
|
stepsIconCustomFontSize,
|
|
processIconColor,
|
|
} = token;
|
|
|
|
return {
|
|
[`${componentCls}-item-custom`]: {
|
|
[`> ${componentCls}-item-container > ${componentCls}-item-icon`]: {
|
|
height: 'auto',
|
|
background: 'none',
|
|
border: 0,
|
|
[`> ${componentCls}-icon`]: {
|
|
top: stepsIconCustomTop,
|
|
width: stepsIconCustomSize,
|
|
height: stepsIconCustomSize,
|
|
fontSize: stepsIconCustomFontSize,
|
|
lineHeight: `${stepsIconCustomSize}px`,
|
|
},
|
|
},
|
|
[`&${componentCls}-item-process`]: {
|
|
[`${componentCls}-item-icon > ${componentCls}-icon`]: {
|
|
color: processIconColor,
|
|
},
|
|
},
|
|
},
|
|
|
|
// Only adjust horizontal customize icon width
|
|
[`&:not(${componentCls}-vertical)`]: {
|
|
[`${componentCls}-item-custom`]: {
|
|
[`${componentCls}-item-icon`]: {
|
|
width: 'auto',
|
|
background: 'none',
|
|
},
|
|
},
|
|
},
|
|
};
|
|
};
|
|
|
|
export default genStepsCustomIconStyle;
|