This ReactJS menu is currently used in the header of dashboard but you can use it in any place.
import DropdownMenu from '@src/components/dropdownMenu/DropdownMenu';
<DropdownMenu menuItems={topMenuItems} title={this.state.username} />
JSON array of objects. Each object may have the following fields:
lazy(() => import('@src/<path_to_component>'))
Example of the top menu JSON:
const topMenu = [
{title: 'Profile', url: '/app/profile', component: lazy(() => import('@src/modules/profile/ProfileView'))},
{title: 'Change password', url: '/app/password', component: lazy(() => import('@src/modules/password/ChangePasswordUI'))},
{divider: true},
{title: 'Logout', url: '/api/auth/logout', method: 'post', redirectUrl: '/auth/login'}
];