@ubertheme/mega-menu
Version:
UB Mega Menu Module for Magento PWA Studio
42 lines (30 loc) • 1.07 kB
Markdown
UB Mega Menu is a ready React and GraphQL based module that helps you create a flexible mega menu for a PWA Studio storefront built using Magento PWA Studio.
The module uses PWA Studio’s libraries -- GraphQL, React and many other technologies as part of its stack.
- Magento (v2.4.1 or above) Backend with UB MegaMenuGraphQl installed
- A Storefront or PWA project based on PWA Studio v9.0.0 or above.
| props | type | default value |
| ------------ | :--: | ------------: |
| menuKey | string | null |
| mobileMenuKey | string | null |
**1. Adding dependency**
```
yarn add @ubertheme/mega-menu
```
**2. Wrap the module in your `local-intercept.js` file**
```
/**
* Integration of UB MegaMenu
*/
const {
wrapUBMegaMenuTargetable
} = require('@ubertheme/mega-menu/src/targets');
wrapUBMegaMenuTargetable(targetables, {
menuKey: 'main-menu',
});
```
**3. Re-build your PWA project**