Skip to content

Commit

Permalink
slight updates to the standard (non-storefront navbar)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidqing6432 committed Apr 3, 2024
1 parent feebd5f commit 2220e14
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
6 changes: 4 additions & 2 deletions src/components/NavBarFolder/NavBar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Image from 'next/image';
import React, { useEffect, useState } from 'react';

import { Body2 } from '@/styles/fonts';
import { Body2, Body2Bold } from '@/styles/fonts';
import { totalNumberOfItemsInCart } from '../../api/supabase/queries/cart_queries';

import {
Expand Down Expand Up @@ -52,7 +52,9 @@ export default function NavBar({ ...rest }) {
<IconWithLabelLink href="../cart">
<ShoppingCartIcon />
<Body2>Cart</Body2>
<CartTotalCircle $isZero={isZero}>{data}</CartTotalCircle>
<CartTotalCircle $isZero={isZero}>
<Body2Bold>{data}</Body2Bold>
</CartTotalCircle>
</IconWithLabelLink>
</ButtonsDiv>
</NavBarComp>
Expand Down
18 changes: 12 additions & 6 deletions src/components/NavBarFolder/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@ import Link from 'next/link';
import COLORS from '../../styles/colors';

export const CartTotalCircle = styled.div<{ $isZero?: boolean }>`
width: 20px;
height: 20px;
background: ${COLORS.marineBlue};
display: ${props => (props.$isZero ? 'none' : 'content')};
width: 24px;
height: 24px;
border-radius: 50%;
text-align: center;
transform: translate(19px, -58px);
position: absolute;
top: -12px;
right: -12px;
display: flex;
justify-content: center;
align-items: center;
color: ${COLORS.white};
display: ${props => (props.$isZero ? 'none' : 'content')};
background: ${COLORS.marineBlue};
`;

export const UserProfileIcon = styled(User)`
Expand Down Expand Up @@ -40,6 +44,7 @@ export const ButtonsDiv = styled.div`
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
`;

export const LocationDiv = styled.div`
Expand All @@ -65,4 +70,5 @@ export const IconWithLabelLink = styled(Link)`
align-items: center;
text-decoration: none;
color: ${COLORS.black};
position: relative;
`;

0 comments on commit 2220e14

Please sign in to comment.