From b1f39c05ab92931ae24019f17a69160175d83a3b Mon Sep 17 00:00:00 2001 From: mahdi andalib Date: Wed, 11 May 2022 19:09:29 +0430 Subject: [PATCH] update src/components/Blog/design2/index.js, src/components/SingleProduct/ProductDesign1/index.js and src/components/Tag/index.js --- src/components/Blog/design2/index.js | 4 +- .../SingleProduct/ProductDesign1/index.js | 362 ++++++++---------- src/components/Tag/index.js | 4 +- 3 files changed, 174 insertions(+), 196 deletions(-) diff --git a/src/components/Blog/design2/index.js b/src/components/Blog/design2/index.js index 4e5f3b9..18e868a 100644 --- a/src/components/Blog/design2/index.js +++ b/src/components/Blog/design2/index.js @@ -1,7 +1,7 @@ import React from "react"; import Button from "../../ButtonDesign/Button"; import CommentIcon from "../../MiniComponents/CommentIcon"; -import NewTagDesign from "../../NewTagDesign"; +import TagDesign1 from "../../Tag/TagDesign1"; const BlogDesign2 = ({ blogTitle, @@ -34,7 +34,7 @@ const BlogDesign2 = ({ /> )} {tagButton && ( - { - const [isHovering, setIsHovering] = useState(false); return ( -
-
-
- {/* product image */} -
- {/* icons on image */} -
- {discountPricePercent && ( -
-

- 23% -

-
- )} - {likeBtn && ( -
- -
- )} - {discount && ( -
- -
- )} -
- {/* img */} -
- {verticalImg && ( - setIsHovering(true)} - onMouseLeave={() => setIsHovering(false)} - /> - )} - {horizontalImg && ( - - )} -
- {/* select Color */} - {colors && ( -
- - - - - - - - -
- )} -
+ {/* product image */} +
+ {/* icons on image */} +
+ {discountPricePercent && ( + + )} + {likeBtn && ( +
+ {/* image */} +
+ {verticalImg && ( + product + )} + {horizontalImg && ( + product + )} +
+ {/* select Color */} + {colors && ( +
+ + + + + + + + +
+ )} +
+ {/* product content */} +
+
+

+ نسخه چاپی علموم تجربه هفتم +

+ {productContent && ( +

- -

+ این کتاب شامل گلدان و گیاه و خاک می باشد و همچنین آپشن های خوب + دیگری نیز دارد. +

+ )} + {productCat && ( + + پایه سوم + + )} +
+ {/* star */} + {star && ( +
+ + + 39 +
- {/* product content */} -
-
-

- نسخه چاپی علموم تجربه هفتم -

- {productContent && ( -

- این کتاب شامل گلدان و گیاه و خاک می باشد و همچنین آپشن های خوب - دیگری نیز دارد. -

- )} - {productCat && ( - - پایه سوم - - )} -
- {/* star */} - {star && ( -
- - - 39 - -
- )} - {/* price */} - {priceHolder && ( + )} + {/* price */} + {priceHolder && ( +
+
-
-
- قیمت - {/* price with line on it */} - {discountPrice && ( -

- 145تومان -

- )} -
-

- 145.000تومان + قیمت + {/* price with line on it */} + {discountPrice && ( +

+ 145تومان

-
- {/* add to cart */} - {addToCartHolder && ( - )}
- )} - {productTags && ( -
- {productTags.map((item, index) => ( - - ))} -
- )} - {rangeHolder && ( -
-
-
+

+ 145.000تومان +

+
+ {/* add to cart */} + {addToCartHolder && ( + )}
-
+ )} + {productTags && ( +
+ {productTags.map((item, index) => ( + + ))} +
+ )} + {rangeHolder && ( +
+
+
+ )}
); @@ -214,22 +199,21 @@ const Design1 = ({ export default Design1; -// text colors i used for product title: -// text-darkCrimsonTextColor -// text-productTitle +Design1.defaultProps = { + productHolderClassname: "rounded-lg shadow-sm p-2 border border-[#C3C3C3]", -// text color i used for product excerpt: -// text-productContent + // three buttons on top left side of the holder + discountPricePercent: "23", + likeBtn: true, + discount: true, -// text color i used for product cat: -// text-darkCrimsonTextColor + // دو مدل عکس طراحی کردم که یکی عرض بیشتری دارد یکی ارتفاع + verticalImg: "images/SingleProductgoldon.png", + horizontalImg: false, + // "images/SingleProductwatermelon.png" -Design1.defaultProps = { // icons on product image colors: true, - likeBtn: true, - discount: true, - discountPricePercent: true, // product price discountPrice: true, priceHolder: true, @@ -240,10 +224,6 @@ Design1.defaultProps = { productCat: true, rangeHolder: true, - // دو مدل عکس طراحی کردم که یکی عرض بیشتری دارد یکی ارتفاع - verticalImg: true, - horizontalImg: false, - addToCartHolder: true, productTitleColor: "text-productTitle", @@ -254,8 +234,6 @@ Design1.defaultProps = { // برای درصد دادن به عرض رنج rangeWidth: "w-44", //دی ای وی که محصول داخلش است میتونیم بهش بوردر بدیم - productHolderBorder: "border", - productHolderBorderColor: "border-grayBorderColor", productTitleAlignment: "text-justify", //میتونیم تعیین کنیم که قیمت و دکمه اضاف به سبد خرید کنار یکدیگر باشند یا زیر هم diff --git a/src/components/Tag/index.js b/src/components/Tag/index.js index 4627f35..7ad43e9 100644 --- a/src/components/Tag/index.js +++ b/src/components/Tag/index.js @@ -1,10 +1,10 @@ import React, { useState } from "react"; -import Design1 from "./TagDesign1"; +import TagDesign1 from "./TagDesign1"; function Tag() { const list = { - 1: , + 1: , }; const [type, setType] = useState(1); return (