2022-04-19 11:28:06 +08:00
|
|
|
import type { CSSObject } from '@ant-design/cssinjs';
|
|
|
|
import type { StepsToken } from '.';
|
2022-06-27 14:25:59 +08:00
|
|
|
import type { GenerateStyle } from '../../theme';
|
2022-04-19 11:28:06 +08:00
|
|
|
|
|
|
|
const genStepsSmallStyle: GenerateStyle<StepsToken, CSSObject> = token => {
|
|
|
|
const {
|
|
|
|
componentCls,
|
|
|
|
stepsSmallIconSize,
|
|
|
|
// stepsSmallIconMargin,
|
|
|
|
fontSizeSM,
|
|
|
|
fontSizeBase,
|
2022-08-04 16:16:50 +08:00
|
|
|
colorTextDescription,
|
2022-04-19 11:28:06 +08:00
|
|
|
} = token;
|
|
|
|
|
|
|
|
return {
|
|
|
|
[`&${componentCls}-small`]: {
|
|
|
|
[`&${componentCls}-horizontal:not(${componentCls}-label-vertical) ${componentCls}-item`]: {
|
2022-06-01 11:19:05 +08:00
|
|
|
paddingInlineStart: token.paddingSM,
|
2022-04-19 11:28:06 +08:00
|
|
|
'&:first-child': {
|
2022-06-01 11:19:05 +08:00
|
|
|
paddingInlineStart: 0,
|
2022-04-19 11:28:06 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
[`${componentCls}-item-icon`]: {
|
|
|
|
width: stepsSmallIconSize,
|
|
|
|
height: stepsSmallIconSize,
|
|
|
|
// margin: stepsSmallIconMargin,
|
2022-06-01 11:19:05 +08:00
|
|
|
marginTop: 0,
|
|
|
|
marginBottom: 0,
|
|
|
|
marginInline: `0 ${token.marginXS}px`,
|
2022-04-19 11:28:06 +08:00
|
|
|
fontSize: fontSizeSM,
|
|
|
|
lineHeight: `${stepsSmallIconSize}px`,
|
|
|
|
textAlign: 'center',
|
|
|
|
borderRadius: stepsSmallIconSize,
|
|
|
|
},
|
|
|
|
[`${componentCls}-item-title`]: {
|
2022-06-01 11:19:05 +08:00
|
|
|
paddingInlineEnd: token.paddingSM,
|
2022-04-19 11:28:06 +08:00
|
|
|
fontSize: fontSizeBase,
|
|
|
|
lineHeight: `${stepsSmallIconSize}px`,
|
|
|
|
|
|
|
|
'&::after': {
|
2022-06-01 11:19:05 +08:00
|
|
|
top: stepsSmallIconSize / 2,
|
2022-04-19 11:28:06 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
[`${componentCls}-item-description`]: {
|
2022-08-04 16:16:50 +08:00
|
|
|
color: colorTextDescription,
|
2022-04-19 11:28:06 +08:00
|
|
|
fontSize: fontSizeBase,
|
|
|
|
},
|
|
|
|
[`${componentCls}-item-tail`]: {
|
2022-06-01 11:19:05 +08:00
|
|
|
top: token.marginXS,
|
2022-04-19 11:28:06 +08:00
|
|
|
},
|
|
|
|
[`${componentCls}-item-custom ${componentCls}-item-icon`]: {
|
|
|
|
width: 'inherit',
|
|
|
|
height: 'inherit',
|
|
|
|
lineHeight: 'inherit',
|
|
|
|
background: 'none',
|
2022-06-01 11:19:05 +08:00
|
|
|
border: 0,
|
|
|
|
borderRadius: 0,
|
2022-04-19 11:28:06 +08:00
|
|
|
[`> ${componentCls}-icon`]: {
|
|
|
|
fontSize: stepsSmallIconSize,
|
|
|
|
lineHeight: `${stepsSmallIconSize}px`,
|
|
|
|
transform: 'none',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
export default genStepsSmallStyle;
|