@@ -49,10 +49,15 @@ type NavBarProps = {
4949 contentRef : React . RefObject < HTMLDivElement > ;
5050 routes : NavbarRoute [ ] ;
5151 header ?: React . ReactNode ;
52+ /**
53+ * Content rendered above the navbar title. Useful when the sidebar
54+ * needs to show context (app + org) before the page title
55+ */
56+ headerAboveTitle ?: React . ReactNode ;
5257} ;
5358
5459export const NavBar = ( props : NavBarProps ) => {
55- const { contentRef, title, titleSx, description, routes, header } = props ;
60+ const { contentRef, title, titleSx, description, routes, header, headerAboveTitle } = props ;
5661 const { close } = useNavbarContext ( ) ;
5762 const { navigate } = useRouter ( ) ;
5863 const { navigateToFlowStart } = useNavigateToFlowStart ( ) ;
@@ -129,11 +134,13 @@ export const NavBar = (props: NavBarProps) => {
129134 title = { title }
130135 titleSx = { titleSx }
131136 description = { description }
137+ headerAboveTitle = { headerAboveTitle }
132138 >
133139 { header }
134140 { items }
135141 </ NavbarContainer >
136142 < MobileNavbarContainer >
143+ { headerAboveTitle }
137144 { header }
138145 { items }
139146 </ MobileNavbarContainer >
@@ -146,9 +153,10 @@ const NavbarContainer = (
146153 title : LocalizationKey | string ;
147154 titleSx ?: ThemableCssProp ;
148155 description ?: LocalizationKey | string ;
156+ headerAboveTitle ?: React . ReactNode ;
149157 } > ,
150158) => {
151- const { title, titleSx, description } = props ;
159+ const { title, titleSx, description, headerAboveTitle } = props ;
152160 return (
153161 < Col
154162 elementDescriptor = { descriptors . navbar }
@@ -170,6 +178,7 @@ const NavbarContainer = (
170178 < DevModeOverlay />
171179
172180 < Col sx = { t => ( { gap : t . space . $6 , flex : `0 0 ${ t . space . $60 } ` } ) } >
181+ { headerAboveTitle }
173182 < Col
174183 sx = { t => ( {
175184 gap : t . space . $0x5 ,
0 commit comments