@@ -2,6 +2,7 @@ import { normalizeProps, useMachine } from "@zag-js/react"
22import * as navigationMenu from "@zag-js/navigation-menu"
33import { useId } from "react"
44import { BiChevronDown } from "react-icons/bi"
5+ import { Presence } from "../components/presence"
56
67const solutionLinks = [
78 {
@@ -52,13 +53,13 @@ export function NavigationMenu(props: NavigationMenuProps) {
5253 return (
5354 < nav className = "navigation-menu" { ...api . getRootProps ( ) } >
5455 < div { ...api . getListProps ( ) } >
55- < div { ...api . getItemProps ( { value : "solutions " } ) } >
56- < button { ...api . getTriggerProps ( { value : "solutions " } ) } >
57- Solutions
56+ < div { ...api . getItemProps ( { value : "products " } ) } >
57+ < button { ...api . getTriggerProps ( { value : "products " } ) } >
58+ Products
5859 < BiChevronDown />
5960 </ button >
60- < span { ...api . getTriggerProxyProps ( { value : "solutions " } ) } />
61- < span { ...api . getViewportProxyProps ( { value : "solutions " } ) } />
61+ < span { ...api . getTriggerProxyProps ( { value : "products " } ) } />
62+ < span { ...api . getViewportProxyProps ( { value : "products " } ) } />
6263 </ div >
6364
6465 < div { ...api . getItemProps ( { value : "learn" } ) } >
@@ -80,31 +81,31 @@ export function NavigationMenu(props: NavigationMenuProps) {
8081 </ a >
8182 </ div >
8283
83- < div { ...api . getIndicatorProps ( ) } >
84+ < Presence keepMounted { ...api . getIndicatorProps ( ) } >
8485 < div { ...api . getArrowProps ( ) } />
85- </ div >
86+ </ Presence >
8687 </ div >
8788
8889 < div { ...api . getViewportPositionerProps ( ) } >
89- < div { ...api . getViewportProps ( ) } >
90- < div { ...api . getContentProps ( { value : "solutions " } ) } >
90+ < Presence keepMounted { ...api . getViewportProps ( ) } >
91+ < Presence keepMounted { ...api . getContentProps ( { value : "products " } ) } >
9192 < ul className = "grid-link-list" >
9293 { solutionLinks . map ( ( item ) => (
9394 < li key = { item . title } >
9495 < a
9596 href = { item . href }
9697 className = "link-card"
97- { ...api . getLinkProps ( { value : "solutions " } ) }
98+ { ...api . getLinkProps ( { value : "products " } ) }
9899 >
99100 < h3 > { item . title } </ h3 >
100101 < p > { item . description } </ p >
101102 </ a >
102103 </ li >
103104 ) ) }
104105 </ ul >
105- </ div >
106+ </ Presence >
106107
107- < div { ...api . getContentProps ( { value : "learn" } ) } >
108+ < Presence keepMounted { ...api . getContentProps ( { value : "learn" } ) } >
108109 < ul className = "flex-link-list" >
109110 { learnLinks . map ( ( item ) => (
110111 < li key = { item . title } >
@@ -119,8 +120,8 @@ export function NavigationMenu(props: NavigationMenuProps) {
119120 </ li >
120121 ) ) }
121122 </ ul >
122- </ div >
123- </ div >
123+ </ Presence >
124+ </ Presence >
124125 </ div >
125126 </ nav >
126127 )
0 commit comments