@@ -29,6 +29,7 @@ export function initTopNavigationHeight() {
2929 }
3030 const topNavHeight = topNav [ 0 ] . clientHeight
3131 if ( topNavHeight ) {
32+ console . info ( "UIKitTs - Top navigation height set to:" , topNavHeight )
3233 document . documentElement . style . setProperty (
3334 topNavigationHeightVar ,
3435 `${ topNavHeight } px` ,
@@ -40,6 +41,7 @@ export function initTopNavigationHeight() {
4041 const header = headers . item ( i )
4142 if ( header ?. getAttribute ( "role" ) === "banner" ) {
4243 const bannerHeight = header . clientHeight || 0
44+ console . info ( "UIKitTs - Banner height set to:" , bannerHeight )
4345 document . documentElement . style . setProperty (
4446 bannerHeightVar ,
4547 `${ bannerHeight } px` ,
@@ -54,7 +56,7 @@ export function initTopNavigationHeight() {
5456
5557 if ( ! uikts_layouting_heightCB ) {
5658 window . addEventListener ( "resize" , initTopNavigationHeight )
57- console . info ( "Added resize event listener for App layouting" )
59+ console . info ( "UIKitTs - Added resize event listener for App layouting" )
5860 uikts_layouting_heightCB = true
5961 }
6062}
@@ -68,11 +70,13 @@ function Container({
6870 className,
6971 style,
7072 testId,
73+ useBanner = false ,
7174} : {
7275 children : React . ReactNode
7376 className ?: string
7477 style ?: React . CSSProperties
7578 testId ?: string
79+ useBanner ?: boolean
7680} ) {
7781 return (
7882 < div
@@ -83,15 +87,24 @@ function Container({
8387 data-layout-container = "true"
8488 data-testid = { testId }
8589 style = { {
86- gridTemplateAreas : `
90+ gridTemplateAreas : useBanner
91+ ? `
8792 "left-panel banner right-panel"
8893 "left-panel top-navigation right-panel"
8994 "left-panel content right-panel"
95+ `
96+ : `
97+ "left-panel top-navigation right-panel"
98+ "left-panel content right-panel"
9099 ` ,
91100 gridTemplateColumns : `var(${ leftPanelWidthVar } , 0px) minmax(0, 1fr) var(${ rightPanelWidthVar } , 0px)` ,
92- gridTemplateRows : `var(${ topNavigationHeightVar } , min-content) 1fr` ,
101+ gridTemplateRows : useBanner
102+ ? `var(${ bannerHeightVar } , 0) var(${ topNavigationHeightVar } , min-content) 1fr`
103+ : `var(${ topNavigationHeightVar } , min-content) 1fr` ,
93104 outline : "none" ,
94- height : `calc(100dvh - var(${ bannerHeightVar } , 0px))` ,
105+ height : useBanner
106+ ? "100dvh"
107+ : `calc(100dvh - var(${ bannerHeightVar } , 0px))` ,
95108 ...style ,
96109 } }
97110 >
0 commit comments