@@ -13,14 +13,15 @@ import {
13
13
SIDE_NAV_EXPANDED_L1_WIDTH_XL ,
14
14
} from './tokens' ;
15
15
import BaseBox from '~components/Box/BaseBox' ;
16
- import { makeMotionTime , makeSize , makeSpace } from '~utils' ;
16
+ import { makeBorderSize , makeMotionTime , makeSize , makeSpace } from '~utils' ;
17
17
import { Drawer , DrawerBody , DrawerHeader } from '~components/Drawer' ;
18
18
import { SkipNavContent , SkipNavLink } from '~components/SkipNav/SkipNav' ;
19
19
import { useIsMobile } from '~utils/useIsMobile' ;
20
20
import { getStyledProps } from '~components/Box/styledProps' ;
21
21
import { metaAttribute , MetaConstants } from '~utils/metaAttribute' ;
22
22
import type { BladeElementRef } from '~utils/types' ;
23
23
import { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute' ;
24
+ import { size as sizeTokens } from '~tokens/global' ;
24
25
25
26
const {
26
27
COLLAPSED ,
@@ -93,6 +94,22 @@ const getL1MenuClassName = ({
93
94
return '' ;
94
95
} ;
95
96
97
+ const BannerContainer = styled ( BaseBox ) ( ( props ) => {
98
+ return {
99
+ '&:not(:empty)' : {
100
+ borderBottom : makeBorderSize ( props . theme . border . width . thin ) ,
101
+ borderBottomStyle : 'solid' ,
102
+ borderBottomColor : props . theme . colors . surface . border . gray . muted ,
103
+ borderRight : makeBorderSize ( props . theme . border . width . thin ) ,
104
+ borderRightStyle : 'solid' ,
105
+ borderRightColor : props . theme . colors . surface . border . gray . muted ,
106
+ padding : makeSpace ( props . theme . spacing [ 3 ] ) ,
107
+ maxHeight : makeSize ( sizeTokens [ '100' ] ) ,
108
+ width : '100%' ,
109
+ } ,
110
+ } ;
111
+ } ) ;
112
+
96
113
/**
97
114
* ### SideNav component
98
115
*
@@ -253,19 +270,7 @@ const _SideNav = (
253
270
{ ...getStyledProps ( rest ) }
254
271
{ ...makeAnalyticsAttribute ( rest ) }
255
272
>
256
- { banner ? (
257
- < BaseBox
258
- borderBottom = "thin"
259
- borderBottomColor = "surface.border.gray.muted"
260
- borderRight = "thin"
261
- borderRightColor = "surface.border.gray.muted"
262
- padding = "spacing.3"
263
- maxHeight = "100px"
264
- width = "100%"
265
- >
266
- { banner }
267
- </ BaseBox >
268
- ) : null }
273
+ { banner ? < BannerContainer > { banner } </ BannerContainer > : null }
269
274
< BaseBox position = "relative" display = "block" flex = "1" width = "100%" >
270
275
< BaseBox
271
276
position = "absolute"
0 commit comments