File tree Expand file tree Collapse file tree 4 files changed +13
-10
lines changed
Expand file tree Collapse file tree 4 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { AppContext } from 'utils/context/AppContext';
88 * Currently only displays a sample cart.
99 * Displays amount of items in cart.
1010 */
11- const Cart = ( ) => {
11+ const Cart = ( { stickyNav } ) => {
1212 const [ cart ] = useContext ( AppContext ) ;
1313
1414 const productsCount =
@@ -22,7 +22,7 @@ const Cart = () => {
2222 aria-label = "Handlekurv"
2323 >
2424 < svg
25- className = " fill-current"
25+ className = { ` ${ stickyNav ? ' fill-white' : 'fill- current' } ` }
2626 xmlns = "https://www.w3.org/2000/svg"
2727 width = "55"
2828 height = "55"
@@ -40,7 +40,10 @@ const Cart = () => {
4040 </ Link >
4141 { /*Cart quantity */ }
4242 { productsCount && (
43- < span className = "w-6 h-6 pb-2 -mt-5 text-center text-white bg-black rounded-full" >
43+ < span
44+ className = { `w-6 h-6 pb-2 -mt-5 text-center rounded-full
45+ ${ stickyNav ? 'text-black bg-white' : 'text-white bg-black' } ` }
46+ >
4447 { productsCount }
4548 </ span >
4649 ) }
Original file line number Diff line number Diff line change @@ -13,9 +13,9 @@ import Hamburger from '../Header/Hamburger.component';
1313const Stickynav = ( ) => (
1414 < nav
1515 id = "footer"
16- className = "fixed bottom-0 z-50 w-full py-1 bg-white md:hidden lg:hidden xl:hidden"
16+ className = "fixed bottom-0 z-50 w-full md:hidden lg:hidden xl:hidden"
1717 >
18- < div className = "container flex flex-wrap items-center justify-between px-6 py-3 mx-auto mt-0 md:min-w-96" >
18+ < div className = "container flex flex-wrap items-center justify-between px-6 py-3 mx-auto mt-0 md:min-w-96 bg-blue-800 " >
1919 < Hamburger />
2020 < div
2121 className = "order-3 hidden w-full md:flex md:items-center md:w-auto md:order-1"
@@ -41,7 +41,7 @@ const Stickynav = () => (
4141 < div className = "flex items-center order-2 md:order-3" id = "nav-content" >
4242 < Search />
4343 < SVGMobileSearchIcon />
44- < Cart />
44+ < Cart stickyNav />
4545 </ div >
4646 </ div >
4747 </ nav >
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ const Hamburger = () => {
4949 const opacityFull = 'opacity-100 group-hover:opacity-100' ;
5050
5151 return (
52- < div className = "z-50 md:hidden lg:hidden xl:hidden bg-gray -800" >
52+ < div className = "z-50 md:hidden lg:hidden xl:hidden bg-blue -800" >
5353 < button
5454 className = "flex flex-col w-16 rounded justify-center items-center group"
5555 data-cy = "hamburger"
Original file line number Diff line number Diff line change @@ -32,11 +32,11 @@ const SVGMobileSearchIcon = () => {
3232 onClick = { ( ) => {
3333 setisExpanded ( ! isExpanded ) ;
3434 } }
35- fill = "#000000 "
35+ fill = "#fff "
3636 xmlns = "https://www.w3.org/2000/svg"
3737 viewBox = "0 0 50 50"
38- width = "20px "
39- height = "20px "
38+ width = "35px "
39+ height = "35px "
4040 >
4141 < path d = "M 21 3 C 11.601563 3 4 10.601563 4 20 C 4 29.398438 11.601563 37 21 37 C 24.355469 37 27.460938 36.015625 30.09375 34.34375 L 42.375 46.625 L 46.625 42.375 L 34.5 30.28125 C 36.679688 27.421875 38 23.878906 38 20 C 38 10.601563 30.398438 3 21 3 Z M 21 7 C 28.199219 7 34 12.800781 34 20 C 34 27.199219 28.199219 33 21 33 C 13.800781 33 8 27.199219 8 20 C 8 12.800781 13.800781 7 21 7 Z" />
4242 </ svg >
You can’t perform that action at this time.
0 commit comments