@howtocodewell/header-menu
v1.3.0
Published
How To Code Well Header Menu
Downloads
7
Readme
How To Code Well header-menu
The header menu of How To Code Well which is shared across multiple sites
Install
$ npm install --save @howtocodewell/header-menu
$ npm run build
Usage
- Create the following config file in
<project_root>/src/config/headerMenu.json
and changename
andurl
values.
{
"items": [
{
"name": "Overriden",
"url": "https://howtocodewell.net/merch"
},
{
"name": "Courses",
"url": "https://howtocodewell.net/shop"
},
{
"name": "Tutorials",
"url": "https://howtocodewell.net/courses"
},
{
"name": "Orders",
"url": "https://codechallenges.howtocodewell.net"
}
]
}
- Import the module and config
import HeaderMenu from "@howtocodewell/header-menu"
import menu from "./config/headerMenu.json"
- Load the
HeaderMenu
and pass the menu property
<HeaderMenu menu={menu} />