From 3ec41a2ce190624e3842a7020adacd40d4fc33ed Mon Sep 17 00:00:00 2001 From: Marco Loyo Date: Wed, 22 Mar 2023 18:32:31 -0600 Subject: [PATCH] fix: update colors according to figma template --- .../src/components/layout/B3Nav.tsx | 40 ++++++++----------- 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/apps/storefront/src/components/layout/B3Nav.tsx b/apps/storefront/src/components/layout/B3Nav.tsx index 0d7cb933..9f7b6b4a 100644 --- a/apps/storefront/src/components/layout/B3Nav.tsx +++ b/apps/storefront/src/components/layout/B3Nav.tsx @@ -109,30 +109,25 @@ export const B3Nav = ({ } const newRoutes = menuItems() const activePath = (path: string) => { - const activeStyle = { - color: 'white', - bgcolor: '#3385d6', - borderRadius: '4px', - } if (location.pathname === path) { B3SStorage.set('nextPath', path) - return activeStyle + return true } if (location.pathname.includes('orderDetail')) { const gotoOrderPath = B3SStorage.get('nextPath') === '/company-orders' ? '/company-orders' : '/orders' - if (path === gotoOrderPath) return activeStyle + if (path === gotoOrderPath) return true } if (location.pathname.includes('shoppingList') && path === '/shoppingLists') { - return activeStyle + return true } if (location.pathname.includes('/quoteDetail') || location.pathname.includes('/quoteDraft')) { - if (path === '/quotes') return activeStyle + if (path === '/quotes') return true } - return {} + return false } return ( ( handleClick(item)} key={item.path} disablePadding > - + handleClick(item)} + sx={{ + borderRadius: '4px', + }} + selected={activePath(item.path)} + > {/* 5 */}