ant-design/components/steps/style/small.ts
二货爱吃白萝卜 ff614114c0
refactor: Rename Steps labelPlacement to titlePlacement (#53873)
* refactor: labelPlacement

* test: update snapshot
2025-05-20 18:00:38 +08:00

28 lines
937 B
TypeScript

import type { CSSObject } from '@ant-design/cssinjs';
import type { StepsToken } from '.';
import type { GenerateStyle } from '../../theme/internal';
import { getItemWithWidthStyle } from './util';
const genSmallStyle: GenerateStyle<StepsToken, CSSObject> = (token) => {
const { componentCls, iconSizeSM, fontSize, lineHeight, marginXS } = token;
return {
[`${componentCls}${componentCls}-small`]: {
'--steps-icon-size': iconSizeSM,
'--steps-title-horizontal-item-margin': token.marginSM,
'--steps-title-vertical-row-gap': token.paddingXS,
'--steps-title-font-size': fontSize,
'--steps-title-line-height': lineHeight,
'--steps-title-horizontal-rail-margin': token.marginXS,
// Horizontal: label vertical
[`&${componentCls}-horizontal${componentCls}-title-vertical`]: getItemWithWidthStyle(
token,
marginXS,
),
},
};
};
export default genSmallStyle;