ant-design/components/steps/style/progress.ts
MadCcc 0b8c112193
feat: token wireframe (#37507)
* feat: wireframe token

* feat: token wireframe

* feat: wireframe steps

* feat: wireframe table

* feat: wireframe modal

* feat: wireframe popover

* chore: update token collect
2022-09-13 11:52:56 +08:00

47 lines
1.3 KiB
TypeScript

import type { CSSObject } from '@ant-design/cssinjs';
import type { StepsToken } from '.';
import type { GenerateStyle } from '../../theme';
const genStepsProgressStyle: GenerateStyle<StepsToken, CSSObject> = token => {
const { antCls, componentCls } = token;
return {
[`&${componentCls}-with-progress`]: {
[`${componentCls}-item`]: {
paddingTop: token.paddingXXS,
[`${componentCls}-item-tail`]: {
top: `${token.marginXXS}px !important`,
},
},
[`&${componentCls}-horizontal`]: {
[`${componentCls}-item:first-child`]: {
paddingBottom: token.paddingXXS,
paddingInlineStart: token.paddingXXS,
},
},
[`&${componentCls}-label-vertical`]: {
[`${componentCls}-item ${componentCls}-item-tail`]: {
top: token.margin - 2 * token.lineWidth,
},
},
[`${componentCls}-item-icon`]: {
position: 'relative',
[`${antCls}-progress`]: {
position: 'absolute',
insetBlockStart:
(token.stepsIconSize - token.stepsProgressSize - token.lineWidth * 2) / 2,
insetInlineStart:
(token.stepsIconSize - token.stepsProgressSize - token.lineWidth * 2) / 2,
},
},
},
};
};
export default genStepsProgressStyle;