diff --git a/src/assets/images/shopping-cart-solid.svg b/src/assets/images/shopping-cart-solid.svg new file mode 100644 index 0000000..e7c58dc --- /dev/null +++ b/src/assets/images/shopping-cart-solid.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/index.js b/src/assets/index.js index 1aa4aa1..3684fc2 100644 --- a/src/assets/index.js +++ b/src/assets/index.js @@ -1,4 +1,6 @@ import plc from "./images/B1-14MR2-D24.jpg"; import w2c from "./images/W2C.jpg"; import banner from "./images/banner-plc.png" -export { plc, w2c, banner }; +import carticon from "./images/shopping-cart-solid.svg" + +export { plc, w2c, banner, carticon } ; diff --git a/src/components/cart/cartIcon.css b/src/components/cart/cartIcon.css new file mode 100644 index 0000000..a78e19b --- /dev/null +++ b/src/components/cart/cartIcon.css @@ -0,0 +1,70 @@ +.top-menu{ + color: white; + background-color: navy; + padding-top: 4rem; + position: relative; + bottom: 0; + width: 100%; + height: 40px; + text-align: center; +} + +svg { + display: block; + width: 60px; + z-index: 0; + position: absolute; + left: 3.4rem; + right: 1 rem; + bottom: 5px; + margin-left: auto; + margin-right: auto; +} + +.cart-badge { + position: absolute; + left: 75px; + bottom: 30px; + display: block; + width: 27px; + height: 27px; + font-size: 1rem; + font-weight: light; + font-family: "Trebuchet MS", sans-serif; + text-transform: uppercase; + text-align: center; + line-height: 1.8rem; + color: white; + border: none; + border-radius: 50%; + background: #b91538; + cursor: pointer; + box-shadow: 0 0 0 0 rgba(#fff, 0.3); + z-index: 50; +} + +.cart-price { + position: absolute; + left: 110px; + bottom: 25px; + display: block; + width: 25px; + height: 25px; + font-size: 1.2rem; + font-weight: bold; + font-family: "Trebuchet MS", sans-serif; + text-transform: uppercase; + text-align: center; + line-height: 1.8rem; + color: rgb(90, 214, 245); + border: none; + /* border-radius: 50%; + background: #b91538; */ + cursor: pointer; + box-shadow: 0 0 0 0 rgba(#fff, 0.3); + z-index: 50; + } + +.st0 { + fill: #ffffff; +} diff --git a/src/components/cart/cartIcon.jsx b/src/components/cart/cartIcon.jsx new file mode 100644 index 0000000..bf3b51c --- /dev/null +++ b/src/components/cart/cartIcon.jsx @@ -0,0 +1,40 @@ +import React from "react"; +// import { carticon } from "../../assets"; +import "./cartIcon.css"; + +let ShoppingCartIcon = () => { + return ( + + ); +}; + +const CartIcon = ({ count, total }) => { + return ( +