From 1cf657516e1249373c3e44247700d435473c7d59 Mon Sep 17 00:00:00 2001 From: kumikokashii Date: Tue, 23 Jun 2020 19:10:14 -0700 Subject: [PATCH] feat(navbar): add hamberger icon for mobile, and dividers --- src/components/Navbar.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 62ddca4548..86cb9a67bc 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -18,6 +18,14 @@ const Navbar = () => { history.push(location) } + const dividerAboveLabels = [ + 'patients.newPatient', + 'scheduling.appointments.new', + 'labs.requests.new', + 'incidents.reports.new', + 'settings.label', + ] + function getDropdownListOfPages(pages: Page[]) { return pages .filter((page) => !page.permission || permissions.includes(page.permission)) @@ -27,6 +35,7 @@ const Navbar = () => { onClick: () => { navigateTo(page.path) }, + dividerAbove: dividerAboveLabels.indexOf(page.label) > -1, })) } @@ -42,9 +51,11 @@ const Navbar = () => { variant="dark" navItems={[ { + name: 'menu', + size: 'lg', + type: 'link-list-icon', children: getDropdownListOfPages(hambergerPages), label: '', - type: 'link-list', className: 'nav-hamberger pr-4 d-md-none', }, {