You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
2.1 KiB
68 lines
2.1 KiB
import type { CSSObject } from '@ant-design/cssinjs';
|
|
import type { GenerateStyle } from '../../_util/theme';
|
|
import type { StepsToken } from '.';
|
|
|
|
const genStepsSmallStyle: GenerateStyle<StepsToken, CSSObject> = token => {
|
|
const {
|
|
componentCls,
|
|
stepsSmallIconSize,
|
|
// stepsSmallIconMargin,
|
|
fontSizeSM,
|
|
fontSizeBase,
|
|
colorTextSecondary,
|
|
} = token;
|
|
|
|
return {
|
|
[`&${componentCls}-small`]: {
|
|
[`&${componentCls}-horizontal:not(${componentCls}-label-vertical) ${componentCls}-item`]: {
|
|
paddingInlineStart: 12, // FIXME: hardcode in v4
|
|
'&:first-child': {
|
|
paddingInlineStart: 0, // FIXME: hardcode in v4
|
|
},
|
|
},
|
|
|
|
[`${componentCls}-item-icon`]: {
|
|
width: stepsSmallIconSize,
|
|
height: stepsSmallIconSize,
|
|
// margin: stepsSmallIconMargin,
|
|
marginTop: 0, // FIXME: hardcode in v4
|
|
marginBottom: 0, // FIXME: hardcode in v4
|
|
marginInline: '0 8px', // FIXME: hardcode in v4
|
|
fontSize: fontSizeSM,
|
|
lineHeight: `${stepsSmallIconSize}px`,
|
|
textAlign: 'center',
|
|
borderRadius: stepsSmallIconSize,
|
|
},
|
|
[`${componentCls}-item-title`]: {
|
|
paddingInlineEnd: 12, // FIXME: hardcode in v4
|
|
fontSize: fontSizeBase,
|
|
lineHeight: `${stepsSmallIconSize}px`,
|
|
|
|
'&::after': {
|
|
top: stepsSmallIconSize / 2, // FIXME: hardcode in v4
|
|
},
|
|
},
|
|
[`${componentCls}-item-description`]: {
|
|
color: colorTextSecondary,
|
|
fontSize: fontSizeBase,
|
|
},
|
|
[`${componentCls}-item-tail`]: {
|
|
top: 8, // FIXME: hardcode in v4
|
|
},
|
|
[`${componentCls}-item-custom ${componentCls}-item-icon`]: {
|
|
width: 'inherit',
|
|
height: 'inherit',
|
|
lineHeight: 'inherit',
|
|
background: 'none',
|
|
border: 0, // FIXME: hardcode in v4
|
|
borderRadius: 0, // FIXME: hardcode in v4
|
|
[`> ${componentCls}-icon`]: {
|
|
fontSize: stepsSmallIconSize,
|
|
lineHeight: `${stepsSmallIconSize}px`,
|
|
transform: 'none',
|
|
},
|
|
},
|
|
},
|
|
};
|
|
};
|
|
export default genStepsSmallStyle;
|
|
|