mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-12 07:09:55 +08:00
3871763950
* feat: steps support cssVars * fix: fix style * Update check-cssinjs.tsx * fix: fix bug * style: code format * fix: fix bug * refactor: wireframe & tailTop * wip: fix taiTop * fix: remove tailTop and use token calc top fix: remove tailTop and use token calc top perf: add annotation --------- Signed-off-by: lijianan <574980606@qq.com> Co-authored-by: lijianan <574980606@qq.com>
38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
import type { CSSObject } from '@ant-design/cssinjs';
|
|
import type { StepsToken } from '.';
|
|
import { unit } from '@ant-design/cssinjs';
|
|
import type { GenerateStyle } from '../../theme/internal';
|
|
|
|
const genStepsCustomIconStyle: GenerateStyle<StepsToken, CSSObject> = (token) => {
|
|
const { componentCls, customIconTop, customIconSize, customIconFontSize } = token;
|
|
|
|
return {
|
|
[`${componentCls}-item-custom`]: {
|
|
[`> ${componentCls}-item-container > ${componentCls}-item-icon`]: {
|
|
height: 'auto',
|
|
background: 'none',
|
|
border: 0,
|
|
[`> ${componentCls}-icon`]: {
|
|
top: customIconTop,
|
|
width: customIconSize,
|
|
height: customIconSize,
|
|
fontSize: customIconFontSize,
|
|
lineHeight: `${unit(customIconFontSize)}`,
|
|
},
|
|
},
|
|
},
|
|
|
|
// Only adjust horizontal customize icon width
|
|
[`&:not(${componentCls}-vertical)`]: {
|
|
[`${componentCls}-item-custom`]: {
|
|
[`${componentCls}-item-icon`]: {
|
|
width: 'auto',
|
|
background: 'none',
|
|
},
|
|
},
|
|
},
|
|
};
|
|
};
|
|
|
|
export default genStepsCustomIconStyle;
|