mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-15 17:19:11 +08:00
34af3ec550
* 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
57 lines
1.5 KiB
TypeScript
57 lines
1.5 KiB
TypeScript
import type { CSSObject } from '@ant-design/cssinjs';
|
|
import type { StepsToken } from '.';
|
|
import type { GenerateStyle } from '../../theme/internal';
|
|
|
|
const genStepsLabelPlacementStyle: GenerateStyle<StepsToken, CSSObject> = (token) => {
|
|
const { componentCls, iconSize, lineHeight, iconSizeSM } = token;
|
|
|
|
return {
|
|
[`&${componentCls}-label-vertical`]: {
|
|
[`${componentCls}-item`]: {
|
|
overflow: 'visible',
|
|
|
|
'&-tail': {
|
|
marginInlineStart: iconSize / 2 + token.controlHeightLG,
|
|
padding: `${token.paddingXXS}px ${token.paddingLG}px`,
|
|
},
|
|
|
|
'&-content': {
|
|
display: 'block',
|
|
width: (iconSize / 2 + token.controlHeightLG) * 2,
|
|
marginTop: token.marginSM,
|
|
textAlign: 'center',
|
|
},
|
|
|
|
'&-icon': {
|
|
display: 'inline-block',
|
|
marginInlineStart: token.controlHeightLG,
|
|
},
|
|
|
|
'&-title': {
|
|
paddingInlineEnd: 0,
|
|
paddingInlineStart: 0,
|
|
|
|
'&::after': {
|
|
display: 'none',
|
|
},
|
|
},
|
|
|
|
'&-subtitle': {
|
|
display: 'block',
|
|
marginBottom: token.marginXXS,
|
|
marginInlineStart: 0,
|
|
lineHeight,
|
|
},
|
|
},
|
|
[`&${componentCls}-small:not(${componentCls}-dot)`]: {
|
|
[`${componentCls}-item`]: {
|
|
'&-icon': {
|
|
marginInlineStart: token.controlHeightLG + (iconSize - iconSizeSM) / 2,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
};
|
|
export default genStepsLabelPlacementStyle;
|