fix: dropdown down icon size (#41501)

This commit is contained in:
MadCcc 2023-03-28 13:20:59 +08:00 committed by GitHub
parent 86b26e6935
commit 3ef08ed0ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 32 deletions

View File

@ -1,26 +0,0 @@
import type { DropdownToken } from '.';
import type { GenerateStyle } from '../../theme/internal';
const genButtonStyle: GenerateStyle<DropdownToken> = (token) => {
const { componentCls, antCls, paddingXS, opacityLoading } = token;
return {
[`${componentCls}-button`]: {
whiteSpace: 'nowrap',
[`&${antCls}-btn-group > ${antCls}-btn`]: {
[`&-loading, &-loading + ${antCls}-btn`]: {
cursor: 'default',
pointerEvents: 'none',
opacity: opacityLoading,
},
[`&:last-child:not(:first-child):not(${antCls}-btn-icon-only)`]: {
paddingInline: paddingXS,
},
},
},
};
};
export default genButtonStyle;

View File

@ -11,7 +11,6 @@ import {
import getArrowStyle, { getArrowOffset } from '../../style/placementArrow';
import type { FullToken, GenerateStyle } from '../../theme/internal';
import { genComponentStyleHook, mergeToken } from '../../theme/internal';
import genButtonStyle from './button';
import genStatusStyle from './status';
export interface ComponentToken {
@ -71,6 +70,11 @@ const genBaseStyle: GenerateStyle<DropdownToken> = (token) => {
content: '""',
},
[`&-trigger${antCls}-btn > ${iconCls}-down`]: {
fontSize: fontSizeIcon,
transform: 'none',
},
[`${componentCls}-wrap`]: {
position: 'relative',
@ -350,11 +354,7 @@ export default genComponentStyleHook(
dropdownPaddingVertical,
dropdownEdgeChildPadding: paddingXXS,
});
return [
genBaseStyle(dropdownToken),
genButtonStyle(dropdownToken),
genStatusStyle(dropdownToken),
];
return [genBaseStyle(dropdownToken), genStatusStyle(dropdownToken)];
},
(token) => ({
zIndexPopup: token.zIndexPopupBase + 50,