You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.
This is a double component issue. 👯 The ProductMenu is essentially a stylized version of the PopoverTrigger mapbox-react component. The ProductMenuComponent is rendered and added as the content prop in the ProductMenu component.
Example in action
Here it is in the Android docs:
Dependencies
The ProductMenu component uses:
The mapbox-react-component @mapbox/react-popover-trigger.
A data file called src/data/product-nav-items.js. This is probably the most important thing to share between repos. The items in the dropdown should be identical in every repo. I'm not sure what the best approach is for storing this so that it can be updated when new docs sites are added.
The ProductMenuDropdown is rendered and passed to PopoverTrigger as the value for the content prop (not sure if that's the best approach).
The mapbox-react-component @mapbox/react-icon.
It is passed that product-nav-items.js data file from above ☝️ .
Props
ProductMenu:
platform, which it gets from the PageShell in the current docs)
product, which it also gets from the PageShell in the current docs)
ProductMenuDropdown:
categories that come from the product-nav-items.js data file
Things to discuss
What's the best way to factor in the product-nav-items.js data file? Should these be two components or should they be combined?
This is a double component issue. 👯 The
ProductMenu
is essentially a stylized version of thePopoverTrigger
mapbox-react component. TheProductMenuComponent
is rendered and added as thecontent
prop in theProductMenu
component.Example in action
Here it is in the Android docs:
Dependencies
The
ProductMenu
component uses:@mapbox/react-popover-trigger
.src/data/product-nav-items.js
. This is probably the most important thing to share between repos. The items in the dropdown should be identical in every repo. I'm not sure what the best approach is for storing this so that it can be updated when new docs sites are added.ProductMenuDropdown
is rendered and passed toPopoverTrigger
as the value for thecontent
prop (not sure if that's the best approach).@mapbox/react-icon
.product-nav-items.js
data file from above ☝️ .Props
ProductMenu
:platform
, which it gets from the PageShell in the current docs)product
, which it also gets from the PageShell in the current docs)ProductMenuDropdown
:categories
that come from theproduct-nav-items.js
data fileThings to discuss
What's the best way to factor in the
product-nav-items.js
data file? Should these be two components or should they be combined?Starter code
ProductMenu
(Android docs version):ProductMenuDropdown
(Android docs version):The text was updated successfully, but these errors were encountered: