fix: menu style missing (#38583)

This commit is contained in:
二货爱吃白萝卜 2022-11-15 22:08:30 +08:00 committed by GitHub
parent a7820a3dd3
commit c85e570fd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 7 deletions

View File

@ -67,7 +67,7 @@ export interface MenuToken extends FullToken<'Menu'> {
}
// =============================== Base ===============================
const getBaseStyle: GenerateStyle<MenuToken> = token => {
const getBaseStyle: GenerateStyle<MenuToken> = (token) => {
const {
antCls,
componentCls,
@ -243,7 +243,7 @@ const getBaseStyle: GenerateStyle<MenuToken> = token => {
...resetIcon(),
},
[`&.${componentCls}-item-only-child`]: {
[`&${componentCls}-item-only-child`]: {
[`> ${iconCls}, > ${componentCls}-item-icon`]: {
marginInlineEnd: 0,
},
@ -481,7 +481,7 @@ export default (prefixCls: string, injectStyle: boolean): UseComponentStyleResul
initZoomMotion(menuToken, 'zoom-big'),
];
},
token => {
(token) => {
const {
colorPrimary,
colorError,

View File

@ -3,7 +3,7 @@ import { textEllipsis } from '../../style';
import type { MenuToken } from '.';
import type { GenerateStyle } from '../../theme';
const getVerticalInlineStyle: GenerateStyle<MenuToken, CSSObject> = token => {
const getVerticalInlineStyle: GenerateStyle<MenuToken, CSSObject> = (token) => {
const {
componentCls,
menuItemHeight,
@ -27,9 +27,7 @@ const getVerticalInlineStyle: GenerateStyle<MenuToken, CSSObject> = token => {
paddingInline: padding,
overflow: 'hidden',
textOverflow: 'ellipsis',
},
[`${componentCls}-item, ${componentCls}-submenu-title`]: {
marginInline: itemMarginInline,
marginBlock: menuItemMarginInline,
width: `calc(100% - ${itemMarginInline * 2}px)`,
@ -53,7 +51,7 @@ const getVerticalInlineStyle: GenerateStyle<MenuToken, CSSObject> = token => {
};
};
const getVerticalStyle: GenerateStyle<MenuToken> = token => {
const getVerticalStyle: GenerateStyle<MenuToken> = (token) => {
const {
componentCls,
iconCls,