mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 12:39:49 +08:00
fix: padding unit for Progress text-inner (#49250)
Co-authored-by: afc163 <afc163@gmail.com>
This commit is contained in:
parent
9a34206f53
commit
5c54566cdc
@ -1,5 +1,5 @@
|
||||
import type { CSSObject } from '@ant-design/cssinjs';
|
||||
import { Keyframes } from '@ant-design/cssinjs';
|
||||
import { unit, Keyframes } from '@ant-design/cssinjs';
|
||||
|
||||
import { resetComponent } from '../../style';
|
||||
import type { FullToken, GenerateStyle, GetDefaultToken } from '../../theme/internal';
|
||||
@ -189,7 +189,7 @@ const genBaseStyle: GenerateStyle<ProgressToken> = (token) => {
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
marginInlineStart: 0,
|
||||
padding: `0 ${token.paddingXXS}`,
|
||||
padding: `0 ${unit(token.paddingXXS)}`,
|
||||
[`&${progressCls}-text-start`]: {
|
||||
justifyContent: 'start',
|
||||
},
|
||||
|
@ -215,18 +215,25 @@ export default function imageTest(
|
||||
}
|
||||
|
||||
Object.entries(themes).forEach(([key, algorithm]) => {
|
||||
const configTheme = {
|
||||
algorithm,
|
||||
token: {
|
||||
fontFamily: 'Arial',
|
||||
},
|
||||
};
|
||||
|
||||
test(
|
||||
`component image screenshot should correct ${key}`,
|
||||
`.${key}`,
|
||||
<div style={{ background: key === 'dark' ? '#000' : '', padding: `24px 12px` }} key={key}>
|
||||
<ConfigProvider theme={{ algorithm }}>{component}</ConfigProvider>
|
||||
<ConfigProvider theme={configTheme}>{component}</ConfigProvider>
|
||||
</div>,
|
||||
);
|
||||
test(
|
||||
`[CSS Var] component image screenshot should correct ${key}`,
|
||||
`.${key}.css-var`,
|
||||
<div style={{ background: key === 'dark' ? '#000' : '', padding: `24px 12px` }} key={key}>
|
||||
<ConfigProvider theme={{ algorithm, cssVar: true }}>{component}</ConfigProvider>
|
||||
<ConfigProvider theme={{ ...configTheme, cssVar: true }}>{component}</ConfigProvider>
|
||||
</div>,
|
||||
);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user