mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-17 23:50:52 +08:00
28 lines
937 B
TypeScript
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;
|