From 4a5e471df086dcc7cd8930840c82b8e40fdd96cf Mon Sep 17 00:00:00 2001 From: mahdi Date: Sun, 2 Jan 2022 10:19:57 +0330 Subject: [PATCH] update --- src/App.js | 6 +- src/components/bookDesign/BookDesign.js | 2 +- src/components/counterDesign/CounterDesign.js | 14 ++- src/components/productDesign/ProductDesign.js | 25 ++-- src/components/starRating/StarRating.js | 2 +- .../vodProductDesign/VodProductDesign.js | 113 +++++++++++------- 6 files changed, 99 insertions(+), 63 deletions(-) diff --git a/src/App.js b/src/App.js index 5adddaa..0438cbe 100644 --- a/src/App.js +++ b/src/App.js @@ -16,12 +16,12 @@ import VodProductDesign from "./components/vodProductDesign/VodProductDesign"; function App() { return (
- - + {/* */} + {/* */} {/* */} {/* */} {/* */} - {/* */} + {/* */} {/* */} {/* */} diff --git a/src/components/bookDesign/BookDesign.js b/src/components/bookDesign/BookDesign.js index afb6d38..e219da6 100644 --- a/src/components/bookDesign/BookDesign.js +++ b/src/components/bookDesign/BookDesign.js @@ -28,7 +28,7 @@ export const BookDesign = ({ bookBackCoverBg }) => {
+ {/* counter design */}
{likeBtn && (
setCount(count + 1)} /> setCount(count - 1)} />
@@ -55,20 +56,21 @@ const CounterDesign = ({ setCount(count + 1)} /> )}

0 ? { color: "green" } : { color: "red" }} > - {count}{" "} + {count}

{counterDecreaseBtn && ( setCount(count - 1)} /> )} diff --git a/src/components/productDesign/ProductDesign.js b/src/components/productDesign/ProductDesign.js index ee71a71..e1cda11 100644 --- a/src/components/productDesign/ProductDesign.js +++ b/src/components/productDesign/ProductDesign.js @@ -32,6 +32,7 @@ const ProductDesign = ({ rangeHolder, verticalImg, horizontalImg, + rangeWidth, }) => { return (
@@ -109,10 +110,10 @@ const ProductDesign = ({ {/* select Color */} {colors && (
- - - - + + + +
)}
@@ -169,7 +170,7 @@ const ProductDesign = ({
{/* add to cart */} ); })} diff --git a/src/components/vodProductDesign/VodProductDesign.js b/src/components/vodProductDesign/VodProductDesign.js index 090903d..65b8029 100644 --- a/src/components/vodProductDesign/VodProductDesign.js +++ b/src/components/vodProductDesign/VodProductDesign.js @@ -32,6 +32,9 @@ const VodProductDesign = ({ productTitleColor, productCat, rangeHolder, + priceTitle, + productPriceAmountTitle, + addToCartHolder, verticalImg, horizontalImg, }) => { @@ -55,6 +58,7 @@ const VodProductDesign = ({
+ {/* img */}
-
+ {/* content */} +

@@ -97,48 +102,59 @@ const VodProductDesign = ({ )}

- {star && ( -
- - - 39 - -
- )} - {priceHolder && ( -
- {/* price */} -
-
- - قیمت - - {discountPrice && ( -

- 145تومان -

- )} + {/* price */} +
+ {priceHolder && ( +
+ {/* price */} +
+
+ {priceTitle && ( + + قیمت + + )} + {discountPrice && ( +

+ 145تومان +

+ )} +
+

+ 145.000تومان +

-

- 145.000تومان -

+ {/* add to cart */} + {addToCartHolder && ( + + )}
- {/* add to cart */} - -
- )} + )} + {star && ( +
+ + + 39 + +
+ )} +
{productTags && (
)} {rangeHolder && ( -
+
)} @@ -167,6 +183,9 @@ const VodProductDesign = ({ export default VodProductDesign; +// text colors i used: +// text-productPrice + VodProductDesign.defaultProps = { colors: false, likeBtn: false, @@ -174,15 +193,19 @@ VodProductDesign.defaultProps = { discountPricePercent: false, discountPrice: false, productContent: false, - star: false, + star: true, productTags: false, - priceHolder: false, + priceHolder: true, + priceTitle: false, productCat: true, rangeHolder: true, verticalImg: false, horizontalImg: true, + addToCartHolder: false, + productTitleColor: "text-darkCrimsonTextColor", - productHolderBorder: "border-0", + productPriceAmountTitle: "text-productPrice", + productHolderBorder: "border", productHolderBorderColor: "border-grayBorderColor", productTitleAlignment: "text-justify",