ant-design/components/steps/style/custom-icon.ts
MadCcc 34af3ec550
feat: component token rename (#42184)
* feat: component token naming rules

* dcos: update

* feat: modal token rename

* feat: rename result token

* feat: statsitic token rename

* feat: steps token remane

* chore: update snapshot

* chore: fix lint

* feat: semantic part component

* revert: button & notification

* revert: files

* chore: code clean
2023-05-09 19:24:50 +08:00

37 lines
1.0 KiB
TypeScript

import type { CSSObject } from '@ant-design/cssinjs';
import type { StepsToken } from '.';
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: `${customIconFontSize}px`,
},
},
},
// Only adjust horizontal customize icon width
[`&:not(${componentCls}-vertical)`]: {
[`${componentCls}-item-custom`]: {
[`${componentCls}-item-icon`]: {
width: 'auto',
background: 'none',
},
},
},
};
};
export default genStepsCustomIconStyle;