@@ -50,6 +50,7 @@ export interface HiveNavigationProps {
50
50
productName : string ;
51
51
logo ?: ReactNode ;
52
52
navLinks ?: { href : string ; children : ReactNode } [ ] ;
53
+ developerMenu ?: { href : string ; icon : React . FC < { className ?: string } > ; children : ReactNode } [ ] ;
53
54
}
54
55
/**
55
56
*
@@ -70,6 +71,7 @@ export function HiveNavigation({
70
71
productName,
71
72
logo,
72
73
navLinks,
74
+ developerMenu,
73
75
} : HiveNavigationProps ) {
74
76
// `useThemeConfig` doesn't return anything outside of Nextra, and the provider isn't exported
75
77
const themeConfig = useThemeConfig ( ) as ReturnType < typeof useThemeConfig > | undefined ;
@@ -122,7 +124,7 @@ export function HiveNavigation({
122
124
< NavigationMenuItem >
123
125
< NavigationMenuTrigger > Developer</ NavigationMenuTrigger >
124
126
< NavigationMenuContent >
125
- < DeveloperMenu isHive = { isHive } />
127
+ < DeveloperMenu isHive = { isHive } developerMenu = { developerMenu } />
126
128
</ NavigationMenuContent >
127
129
</ NavigationMenuItem >
128
130
{ ! ENTERPRISE_MENU_HIDDEN && (
@@ -267,12 +269,13 @@ export const ProductsMenu = React.forwardRef<HTMLDivElement, ProductsMenuProps>(
267
269
className = "flex flex-row items-center gap-3 px-4 py-2"
268
270
arrow
269
271
>
270
- < div className = "flex size-8 items-center justify-center rounded bg-beige-200 dark:bg-white/5" >
272
+ < div className = "flex size-8 items-center justify-center rounded bg-beige-200 p-[5px] dark:bg-white/5" >
271
273
< Logo className = "size-8 text-green-1000 dark:text-neutral-300" />
272
274
</ div >
273
275
< div >
274
276
< p className = "text-base font-medium leading-normal text-green-1000 dark:text-neutral-200" >
275
- { product . name }
277
+ { /* shortened to one word */ }
278
+ { product . name === PRODUCTS . ESLINT . name ? 'ESLint' : product . name }
276
279
</ p >
277
280
</ div >
278
281
</ NavigationMenuLink >
@@ -318,38 +321,43 @@ MenuContentColumns.displayName = 'MenuContentColumns';
318
321
319
322
interface DeveloperMenuProps extends React . HTMLAttributes < HTMLDivElement > {
320
323
isHive : boolean ;
324
+ developerMenu :
325
+ | undefined
326
+ | { href : string ; icon : React . FC < { className ?: string } > ; children : ReactNode } [ ] ;
321
327
}
322
328
/**
323
329
* @internal
324
330
*/
325
331
export const DeveloperMenu = React . forwardRef < HTMLDivElement , DeveloperMenuProps > (
326
- ( { isHive, ...rest } , ref ) => {
332
+ ( { isHive, developerMenu, ...rest } , ref ) => {
333
+ developerMenu ||= [
334
+ {
335
+ href : isHive ? '/docs' : 'https://the-guild.dev/graphql/hive/docs' ,
336
+ icon : PaperIcon ,
337
+ children : 'Documentation' ,
338
+ } ,
339
+ { href : 'https://status.graphql-hive.com/' , icon : TargetIcon , children : 'Status' } ,
340
+ {
341
+ href : isHive ? '/product-updates' : 'https://the-guild.dev/graphql/hive/product-updates' ,
342
+ icon : RightCornerIcon ,
343
+ children : 'Product Updates' ,
344
+ } ,
345
+ { href : 'https://the-guild.dev/blog' , icon : PencilIcon , children : 'Blog' } ,
346
+ {
347
+ href : 'https://github.com/dotansimha/graphql-code-generator' ,
348
+ icon : GitHubIcon ,
349
+ children : 'GitHub' ,
350
+ } ,
351
+ ] ;
352
+
327
353
return (
328
354
< MenuContentColumns { ...rest } ref = { ref } >
329
355
< div >
330
356
< ColumnLabel > Developer</ ColumnLabel >
331
357
< ul >
332
- { (
333
- [
334
- [
335
- 'Documentation' ,
336
- PaperIcon ,
337
- isHive ? '/docs' : 'https://the-guild.dev/graphql/hive/docs' ,
338
- ] ,
339
- [ 'Status' , TargetIcon , 'https://status.graphql-hive.com/' ] ,
340
- [
341
- 'Product Updates' ,
342
- RightCornerIcon ,
343
- isHive
344
- ? '/product-updates'
345
- : 'https://the-guild.dev/graphql/hive/product-updates' ,
346
- ] ,
347
- [ 'Blog' , PencilIcon , 'https://the-guild.dev/blog' ] ,
348
- [ 'GitHub' , GitHubIcon , 'https://github.com/kamilkisiela/graphql-hive' ] ,
349
- ] as const
350
- ) . map ( ( [ text , Icon , href ] , i ) => (
351
- < MenuColumnListItem key = { i } href = { href } icon = { Icon } >
352
- { text }
358
+ { developerMenu . map ( ( { href, icon, children } , i ) => (
359
+ < MenuColumnListItem key = { i } href = { href } icon = { icon } >
360
+ { children }
353
361
</ MenuColumnListItem >
354
362
) ) }
355
363
</ ul >
@@ -388,7 +396,7 @@ function MenuColumnListItem({
388
396
} : {
389
397
children : ReactNode ;
390
398
href : string ;
391
- icon : ( props : React . SVGProps < SVGSVGElement > ) => React . ReactNode ;
399
+ icon : React . FC < { className ?: string } > ;
392
400
} ) {
393
401
return (
394
402
< li >
0 commit comments