@@ -44,7 +44,6 @@ const StyledHeader = styled.header`
4444 ${ ( { theme } ) => css `
4545 background-color : ${ theme . colorBgContainer } ;
4646 border-bottom : 1px solid ${ theme . colorBorderSecondary } ;
47- min-height : ${ theme . sizeUnit * 13 } px;
4847 padding : 0 ${ theme . sizeUnit * 4 } px;
4948 z-index : 10 ;
5049
@@ -116,17 +115,18 @@ const { SubMenu } = MainNav;
116115const StyledSubMenu = styled ( SubMenu ) `
117116 ${ ( { theme } ) => css `
118117 & .ant-menu-submenu .ant-menu-submenu-horizontal {
119- padding : ${ theme . sizeUnit * 2 } px ${ theme . sizeUnit * 4 } px;
120118 display : flex;
121119 align-items : center;
122120 height : 100% ;
121+ padding : 0 ;
123122
124123 .ant-menu-submenu-title {
125124 display : flex;
126125 gap : ${ theme . sizeUnit * 2 } px;
127126 flex-direction : row-reverse;
128127 align-items : center;
129- padding : 0 ;
128+ height : 100% ;
129+ padding : 0 ${ theme . sizeUnit * 4 } px;
130130 }
131131
132132 & : hover ,
@@ -151,7 +151,8 @@ const StyledSubMenu = styled(SubMenu)`
151151 transition : 0.2s all ease-out;
152152 }
153153
154- & : hover ::after {
154+ & : hover ::after ,
155+ & .ant-menu-submenu-open ::after {
155156 transform : scale (1 );
156157 }
157158 }
@@ -162,6 +163,13 @@ const StyledSubMenu = styled(SubMenu)`
162163 ` }
163164` ;
164165
166+ const StyledBrandWrapper = styled . div < { margin ?: string } > `
167+ ${ ( { margin } ) => css `
168+ height : ${ margin ? 'auto' : '100%' } ;
169+ margin : ${ margin ?? 0 } ;
170+ ` }
171+ ` ;
172+
165173const StyledBrandLink = styled ( Typography . Link ) `
166174 ${ ( { theme } ) => css `
167175 align-items : center;
@@ -281,10 +289,10 @@ export function Menu({
281289 < StyledSubMenu
282290 key = { label }
283291 title = { label }
292+ popupOffset = { [ 0 , - 8 ] }
284293 icon = {
285294 showMenu === 'inline' ? < > </ > : < Icons . DownOutlined iconSize = "xs" />
286295 }
287- popupOffset = { [ 10 , 3 ] }
288296 >
289297 { childs ?. map ( ( child : MenuObjectChildProps | string , index1 : number ) => {
290298 if ( typeof child === 'string' && child === '-' && label !== 'Data' ) {
@@ -318,14 +326,16 @@ export function Menu({
318326 let link ;
319327 if ( theme . brandLogoUrl ) {
320328 link = (
321- < StyledBrandLink href = { theme . brandLogoHref } >
322- < Image
323- preview = { false }
324- src = { theme . brandLogoUrl }
325- alt = { theme . brandLogoAlt || 'Apache Superset' }
326- height = { theme . brandLogoHeight }
327- />
328- </ StyledBrandLink >
329+ < StyledBrandWrapper margin = { theme . brandLogoMargin } >
330+ < StyledBrandLink href = { theme . brandLogoHref } >
331+ < Image
332+ preview = { false }
333+ src = { theme . brandLogoUrl }
334+ alt = { theme . brandLogoAlt || 'Apache Superset' }
335+ height = { theme . brandLogoHeight }
336+ />
337+ </ StyledBrandLink >
338+ </ StyledBrandWrapper >
329339 ) ;
330340 } else if ( isFrontendRoute ( window . location . pathname ) ) {
331341 // ---------------------------------------------------------------------------------
0 commit comments