There are a few exported components that are used for building themes.
Component running the top navigation of the page, including the search bar and the right nav items.
Prop Name | Type | Description |
---|---|---|
brandAttrs | Object | Any Props related to the Logo |
navItems | Array of NavItem | Contains all the navigation items to render at the top right. |
pathname | String | Current path of the page. Can be passed in from the location.pathname from Gatsby. |
navItems
structure:
[{"text": "Availity React",// If matchRegex is passed in it will match the current path to the regex,// otherwise it will match to the current value passed in to the navitem."value": "https://avaiility.github.io/availity-react","matchRegex": /\d}]
Contains the base layout that should be rendered as the first element on your page.
To use this plugin in your theme, you will have to add it to the list of plugins in your gatsby-config.js
.
module.exports = {// ...plugins: [{resolve: '@availity/gatsby-theme-core',options: {root: __dirname,},},],};
import { Layout, TopNavigation } from '@availity/gatsby-theme-core';<Layout><TopNavigation />{/* Page Content */}</Layout>;