@@ -9,27 +9,31 @@ import { XMarkIcon, ChevronDownIcon } from "@heroicons/react/20/solid"
99import { useNavbarSecondaryMenu } from "@docusaurus/theme-common/internal"
1010import SearchBar from "@theme/SearchBar"
1111
12- type Feature = {
12+ type NavLink = {
1313 name : string
1414 href : string
1515}
1616
17- type NavLink = {
17+ type Feature = {
1818 name : string
1919 href : string
20+ icon ?: React . ComponentType < React . SVGProps < SVGSVGElement > >
21+ svg ?: React . ComponentType < React . SVGProps < SVGSVGElement > >
2022}
2123
2224type MobileNavProps = {
2325 mobileMenuOpen : boolean
2426 setMobileMenuOpen : ( open : boolean ) => void
25- features : Feature [ ]
27+ productFeatures : Feature [ ]
28+ compareFeatures : Feature [ ]
2629 navLinks : NavLink [ ]
2730}
2831
2932export default function MobileNav ( {
3033 mobileMenuOpen,
3134 setMobileMenuOpen,
32- features,
35+ productFeatures,
36+ compareFeatures,
3337 navLinks,
3438} : MobileNavProps ) {
3539 const secondaryMenu = useNavbarSecondaryMenu ( )
@@ -61,7 +65,7 @@ export default function MobileNav({
6165 < SearchBar />
6266 </ div >
6367 < div className = "flow-root" >
64- < div className = "-my-6 divide-y mt -4 divide-gray-500/10 dark:divide-gray-700" >
68+ < div className = "divide-y my -4 divide-gray-500/10 dark:divide-gray-700" >
6569 < div className = "space-y-2" >
6670 { secondaryMenu . content ? (
6771 < Disclosure as = "div" className = "-mx-3 mb-4" >
@@ -70,37 +74,81 @@ export default function MobileNav({
7074 < hr />
7175 < a
7276 href = "/"
73- className = "-mx-3 block rounded-lg px-3 py-2.5 text-base font-semibold leading-7 text-gray-900 dark:text-white hover:bg-gray-50 dark:hover:bg-[rgb(33,34,44)]"
77+ className = "-mx-3 block rounded-lg px-3 py-2.5 text-base font-semibold text-gray-900 dark:text-white hover:bg-gray-50 dark:hover:bg-[rgb(33,34,44)]"
7478 >
7579 ← Return to homepage
7680 </ a >
7781 </ div >
7882 </ Disclosure >
7983 ) : (
8084 < >
81- < Disclosure as = "div" className = "-mx-3 pt-4" >
82- < DisclosureButton className = "group flex w-full items-center justify-between rounded-lg py-2 pl-3 pr-3.5 text-base font-semibold leading-7 bg-white text-gray-700 dark:bg-[rgb(38,40,51)] dark:text-white hover:bg-gray-50 dark:hover:bg-[rgb(33,34,44)]" >
85+ < Disclosure as = "div" className = "-mx-3 pt-4" defaultOpen >
86+ < DisclosureButton className = "group flex w-full items-center justify-between rounded-lg py-2 pl-3 pr-3.5 text-base font-semibold bg-white text-gray-700 dark:bg-[rgb(38,40,51)] dark:text-white hover:bg-gray-50 dark:hover:bg-[rgb(33,34,44)]" >
87+ Product
88+ < ChevronDownIcon
89+ aria-hidden = "true"
90+ className = "h-5 w-5 flex-none group-data-[open]:rotate-180"
91+ />
92+ </ DisclosureButton >
93+ < DisclosurePanel className = "mt-2 space-y-2" >
94+ { productFeatures . map ( ( item ) => (
95+ < DisclosureButton
96+ key = { item . name }
97+ as = "a"
98+ href = { item . href }
99+ className = "group flex items-center gap-x-3 rounded-lg text-white py-2 pl-8 pr-3 text-sm font-semibold hover:bg-[rgb(43,45,56)]"
100+ >
101+ { item . icon ? (
102+ < item . icon
103+ aria-hidden = "true"
104+ className = "h-5 w-5 text-gray-300 group-hover:text-primary group-hover:fill-primary"
105+ />
106+ ) : item . svg ? (
107+ < item . svg
108+ aria-hidden = "true"
109+ className = "h-5 w-5 fill-current text-gray-300 group-hover:text-primary group-hover:fill-primary"
110+ />
111+ ) : null }
112+ { item . name }
113+ </ DisclosureButton >
114+ ) ) }
115+ </ DisclosurePanel >
116+ </ Disclosure >
117+
118+ < Disclosure as = "div" className = "-mx-3 pt-4" defaultOpen >
119+ < DisclosureButton className = "group flex w-full items-center justify-between rounded-lg py-2 pl-3 pr-3.5 text-base font-semibold bg-white text-gray-700 dark:bg-[rgb(38,40,51)] dark:text-white hover:bg-gray-50 dark:hover:bg-[rgb(33,34,44)]" >
83120 Compare
84121 < ChevronDownIcon
85122 aria-hidden = "true"
86123 className = "h-5 w-5 flex-none group-data-[open]:rotate-180"
87124 />
88125 </ DisclosureButton >
89126 < DisclosurePanel className = "mt-2 space-y-2" >
90- { features . map ( ( item ) => (
127+ { compareFeatures . map ( ( item ) => (
91128 < DisclosureButton
92129 key = { item . name }
93130 as = "a"
94131 href = { item . href }
95- className = "block rounded-lg text-black dark:text- white py-2 pl-6 pr-3 text-sm font-semibold leading-7 hover:bg-gray-50 dark:hover:bg- [rgb(33,34,44 )]"
132+ className = "group flex items-center gap-x-3 rounded-lg text-white py-2 pl-8 pr-3 text-sm font-semibold hover:bg-[rgb(43,45,56 )]"
96133 >
134+ { item . icon ? (
135+ < item . icon
136+ aria-hidden = "true"
137+ className = "h-5 w-5 text-gray-300 group-hover:text-primary group-hover:fill-primary"
138+ />
139+ ) : item . svg ? (
140+ < item . svg
141+ aria-hidden = "true"
142+ className = "h-5 w-5 fill-current text-gray-300 group-hover:text-primary group-hover:fill-primary"
143+ />
144+ ) : null }
97145 { item . name }
98146 </ DisclosureButton >
99147 ) ) }
100148 </ DisclosurePanel >
101149 </ Disclosure >
102150
103- < div className = "flex flex-col space-y-1 " >
151+ < div className = "flex flex-col space-y-2 " >
104152 { navLinks . map ( ( link ) => (
105153 < a
106154 key = { link . name }
0 commit comments