1
1
'use client' ;
2
2
3
3
import { ActionButton , CloseButton , DialogTrigger } from '@react-spectrum/s2' ;
4
- import { AdobeLogo } from './AdobeLogo' ;
5
4
import { composeRenderProps , OverlayTriggerStateContext , Dialog as RACDialog , DialogProps as RACDialogProps } from 'react-aria-components' ;
5
+ import { getCurrentLibrary , TAB_DEFS } from './SearchMenu' ;
6
6
import { keyframes } from '../../../@react-spectrum/s2/style/style-macro' with { type : 'macro' } ;
7
7
import MenuHamburger from '@react-spectrum/s2/icons/MenuHamburger' ;
8
8
import { Modal } from '../../../@react-spectrum/s2/src/Modal' ;
@@ -107,7 +107,7 @@ const MobileCustomDialog = forwardRef<HTMLDivElement, MobileDialogProps>(functio
107
107
) ;
108
108
} ) ;
109
109
110
- export function MobileHeader ( { toc, nav} ) {
110
+ export function MobileHeader ( { toc, nav, currentPage } ) {
111
111
let ref = useRef < HTMLDivElement | null > ( null ) ;
112
112
113
113
useEffect ( ( ) => {
@@ -129,6 +129,9 @@ export function MobileHeader({toc, nav}) {
129
129
}
130
130
} , [ ] ) ;
131
131
132
+ let currentLibrary = getCurrentLibrary ( currentPage ) ;
133
+ let icon = TAB_DEFS [ currentLibrary ] . icon ;
134
+
132
135
return (
133
136
< div
134
137
ref = { ref }
@@ -172,7 +175,7 @@ export function MobileHeader({toc, nav}) {
172
175
alignItems : 'center' ,
173
176
flexGrow : 1
174
177
} ) } >
175
- < AdobeLogo />
178
+ { icon }
176
179
< h2
177
180
className = { style ( {
178
181
font : 'heading-sm' ,
@@ -184,7 +187,7 @@ export function MobileHeader({toc, nav}) {
184
187
animationTimeline : 'scroll()' ,
185
188
animationRange
186
189
} as CSSProperties } >
187
- React Aria
190
+ { TAB_DEFS [ currentLibrary ] . label }
188
191
</ h2 >
189
192
</ div >
190
193
< div
0 commit comments