Class: MastheadComponent

MastheadComponent(dataObjectopt, optionsopt)

MastheadComponent contains: - a brand Component (a HeadingComponent by default) - a navigation MenuComponent This is usually placed at the top of a page to show the site brand and a navigation menu. Then a Router is used to respond to document.location changes.

Constructor

new MastheadComponent(dataObjectopt, optionsopt)

Parameters:
Name Type Attributes Default Description
dataObject DataObject <optional>
null
options Object <optional>
{}
Properties
Name Type Attributes Default Description
brand string | Component the main title
brandAnchor string <optional>
"/" an activation URL for the brand HeadingComponent
menuItems Array.<Object> <optional>
[]
Properties
Name Type Description
name string
anchor string
Source:
Example
const mastheadComponent = new MastheadComponent(undefined, {
	brand: 'Bink', // 'brand' could also be a Component like an ImageComponent
	menuItems: [
		{ name: 'Home', anchor: '/' },
		{ name: 'About', anchor: '/#about' },
		{ name: 'Account', anchor: '/#account' },
	]
})

Members

brandComponent :Component

Type:
Source:
Type:
Source: