mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-16 01:41:02 +08:00
f4411d9393
* refactor: Steps cssInJs add basic structure * refactor: change Component Steps less into cssInJs * refactor: ♻️ steps cssInJs code formated * style: 💄 change Steps cssinjs left and right into Logical Properties * style: 💄 steps cssinjs add FIXME for number hardcode * style: 💄 steps cssinjs dismiss useless rtl style * style: 💄 step cssinjs fix the 'not compatible with RTL mode' warning and fix the style in RTL mode * style: code formated for FIXME * style: revert the change about _skip_check_ * style: step cssinjs margin/padding used with Logical properties * ci: fix lint check * style: fix the style on RTL * style: try fix the step subtitle order on RTL mode * style: optimization the style on RTL and dismiss duplicate styles with logical properties
49 lines
1.4 KiB
TypeScript
49 lines
1.4 KiB
TypeScript
import type { CSSObject } from '@ant-design/cssinjs';
|
|
import type { GenerateStyle } from '../../_util/theme';
|
|
import type { StepsToken } from '.';
|
|
|
|
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, // FIXME: hardcode in v4
|
|
[`> ${componentCls}-icon`]: {
|
|
top: stepsIconCustomTop,
|
|
insetInlineStart: 0.5, // FIXME: hardcode in v4
|
|
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;
|