Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion src/molecules/navbar/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,22 @@ export const NavbarBase = ({ config, theme }: NavbarTypes) => {
};

/**
* Navbar Component uses the PublisherLogoHeader, HamburgerMenu and Hamburger atomic components internally.
*
* Navbar Component by default uses the PublisherLogoHeader, HamburgerMenu and Hamburger atomic components internally.
* We can also render the customized navbar by passing the render prop navbarRender from the frontend inside app > server > app.js file under ampRoutes as shown below:
*
* ```javascript
* import React from "react";
* const CustomNavbar = ({ config, theme }) => (
* <h1> CUSTOM NAVBAR </h1>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be inside layout and head. refer footer docs . the link i shared with you

* )
* ...
* ...
* ampRoutes(app, {
* navbarRender: ({ config, theme }) => <CustomNavbar config={config} theme={theme} />
* })
* ...
*
*
* @param {Object} props Object containing parameters passed to the render prop
* @param {String} props.align Optional. A string of "right" or "left" which specifies the direction of the hamburger menu.
Expand Down