diff --git a/src/components/CardTrelloDesign/index.js b/src/components/CardTrelloDesign/index.js index 0a66f6d..ca86961 100644 --- a/src/components/CardTrelloDesign/index.js +++ b/src/components/CardTrelloDesign/index.js @@ -2,12 +2,12 @@ import React from "react"; import Button from "../ButtonDesign/Button"; import CircleInCircle from "../CircleInCircle"; import TagDesign1 from "../Tag/TagDesign1"; +import AnimatedProgressBar1 from "../ProgressBar/AnimatedProgressbar1"; import clock from "./images/clock.svg"; import nike from "./images/nike.svg"; import messageText from "./images/message-text.svg"; import ProfilePicNextToEachOther from "../ProfilePicNextToEachOther"; -import AnimatedProgressBar from "../AnimatedProgressBar"; import RelativeCircle from "../MiniComponents/RelativeCircle"; import CommentIcon from "../MiniComponents/CommentIcon"; @@ -95,7 +95,7 @@ const CardTrelloDesign = ({ {/* progressBar */} - { + const [progressBar, setProgressBar] = useState(false); + + useEffect(() => { + setTimeout(() => { + setProgressBar(true); + }, 1000); + }, []); + + return ( +
+
+
+ ); +}; + +export default AnimatedProgressbar1; + +AnimatedProgressbar1.defaultProps = { + rangeWidth: "75%", + parentBg: "bg-gray-200", + childBg: "bg-gray-600", +}; + +// const [rangePercent, setRangePercent] = useState(55); + +// w-[${ +// rangePercent + "%" +// }] + +// className={ +// "h-full bg-gray-300 " + +// `${rangePercent ? "w-[" + rangePercent + "%]" : ""}` +// } +// className={'h-full bg-gray-300"+ `${rangePercent ? 'w-[' + rangePercent + '%]' : ''}`} diff --git a/src/components/ProgressBar/index.js b/src/components/ProgressBar/index.js index 735b2a9..a88e4c8 100644 --- a/src/components/ProgressBar/index.js +++ b/src/components/ProgressBar/index.js @@ -1,10 +1,12 @@ import React, { useState } from "react"; import CircularProgressbar from "./CircularProgressbar"; +import AnimatedProgressbar1 from "./AnimatedProgressbar1"; function ProgressBar() { const list = { 1: , + 2: , }; const [type, setType] = useState(1); return ( diff --git a/src/components/SingleProduct/ProductDesign1/index.js b/src/components/SingleProduct/ProductDesign1/index.js index 0763ad8..afb4f3a 100644 --- a/src/components/SingleProduct/ProductDesign1/index.js +++ b/src/components/SingleProduct/ProductDesign1/index.js @@ -1,32 +1,42 @@ import React, { useState } from "react"; + import TagDesign1 from "../../Tag/TagDesign1"; import ButtonDivTag from "../../ButtonDesign/ButtonDivTag"; import Button from "../../ButtonDesign/Button"; import StarRating from "../../Rating/StarRating1"; import Tooptip1 from "../../Tooltip/Tooltip1"; +import AnimatedProgressbar1 from "../../ProgressBar/AnimatedProgressbar1"; const Design1 = ({ productHolderClassname, + discountPricePercent, likeBtn, discount, - colors, - discountPrice, + verticalImg, + horizontalImg, + + tooltip, + + productTitle, + productTitleClass, + productContent, + productContentClass, + + productCat, + star, - productTags, + + discountPrice, + price, + progressBar, + priceDirection, - productTitleAlignment, + + productTags, priceHolder, - productTitleColor, - productExcerptTextColor, - productCat, - productCatTextColor, - rangeHolder, - verticalImg, - horizontalImg, - rangeWidth, addToCartHolder, }) => { return ( @@ -79,91 +89,108 @@ const Design1 = ({ )} {/* select Color */} - {colors && ( + {tooltip && (
- +
)} {/* product content */} -
-
-

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

- {productContent && ( -

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

- )} - {productCat && ( - - پایه سوم - - )} -
+
+ {/* productTitle */} +

{productTitle}

{" "} + {/* productContent */} + {productContent && ( +

{productContent}

+ )} + {/* productCat */} + {productCat && ( + + )} {/* star */} {star && (
- + 39
)} - {/* price */} + {/* price / add to cart */} {priceHolder && (
+ {/* discounted price / price */}
+ {/* discounted price */}
- قیمت + قیمت {/* price with line on it */} {discountPrice && ( -

- 145تومان +

+ {discountPrice} + تومان

)}
-

- 145.000تومان + {/* price */} +

+ {price} + تومان

{/* add to cart */} {addToCartHolder && ( - + /> )}
)} {productTags && ( -
+
{productTags.map((item, index) => ( ))}
)} - {rangeHolder && ( -
-
-
+ {progressBar && ( + )}
@@ -185,30 +212,29 @@ Design1.defaultProps = { horizontalImg: false, // "images/SingleProductwatermelon.png" - // icons on product image - colors: true, - // product price - discountPrice: true, - priceHolder: true, + tooltip: true, + + productTitle: "نسخه چاپی علموم تجربه هفتم", + productTitleClass: "text-sm text-justify text-[#246E8A]", + + productContent: `این کتاب شامل گلدان و گیاه و خاک می باشد و همچنین آپشن های خوب دیگری نیز دارد.`, + productContentClass: "mt-2 text-[#707070] text-justify text-xs leading-6", - productContent: true, - star: true, - productTags: ["ارسال رایگان", "برچسب های دیگر", "دسته بندی به صورت کادو"], productCat: true, - rangeHolder: true, - addToCartHolder: true, + star: true, + + discountPrice: "145", + price: "145.000", - productTitleColor: "text-productTitle", + addToCartHolder: "اضافه کردن به سبد خرید", - productExcerptTextColor: "text-productContent", + progressBar: true, - productCatTextColor: "text-darkCrimsonTextColor", - // برای درصد دادن به عرض رنج - rangeWidth: "w-44", - //دی ای وی که محصول داخلش است میتونیم بهش بوردر بدیم + priceHolder: true, + + productTags: ["ارسال رایگان", "برچسب های دیگر", "دسته بندی به صورت کادو"], - productTitleAlignment: "text-justify", //میتونیم تعیین کنیم که قیمت و دکمه اضاف به سبد خرید کنار یکدیگر باشند یا زیر هم priceDirection: "flex-row", }; diff --git a/src/components/Tooltip/Tooltip1/index.js b/src/components/Tooltip/Tooltip1/index.js index f406af3..fa4d184 100644 --- a/src/components/Tooltip/Tooltip1/index.js +++ b/src/components/Tooltip/Tooltip1/index.js @@ -28,6 +28,7 @@ export default Tooptip1; Tooptip1.defaultProps = { tooltipPosition: "top", tooltipBgColor: "dark", + items: [ { image: "images/SingleProductyellowDotIcon.svg",