The main nav used in various admin apps, using react router.
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
props | object | Component props. Properties
| ||||||||||||||||||
ref | object | | Ref to the component. |
- Since
- 3.3.2
Returns:
The RouterNavBar component.
- Type:
- JSX.
Element
Example
import RouterNavBar from '@gravityforms/components/react/admin/modules/RouterNavBar';
const items = [
{
item: { active: true, key: 'send-a-test' },
link: { to: '/send-a-test' },
icon: { icon: 'beaker', iconPrefix: 'gravitysmtp-admin-icon' },
text: { content: 'Send a test' },
},
{
item: { active: true, key: 'scheduled-events' },
link: { to: '/scheduled-events' },
icon: { icon: 'clock', iconPrefix: 'gravitysmtp-admin-icon' },
text: { content: 'Scheduled events' },
},
];
return <RouterNavBar items={ items } />;