|
|
@ -22,6 +22,11 @@ const ProductDesign = ({ |
|
|
|
productTags, |
|
|
|
productTags, |
|
|
|
priceDirection, |
|
|
|
priceDirection, |
|
|
|
productTitleAlignment, |
|
|
|
productTitleAlignment, |
|
|
|
|
|
|
|
priceHolder, |
|
|
|
|
|
|
|
productHolderBorder, |
|
|
|
|
|
|
|
productHolderBorderColor, |
|
|
|
|
|
|
|
productTitleColor, |
|
|
|
|
|
|
|
productCat, |
|
|
|
}) => { |
|
|
|
}) => { |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<section className="w-11/12 mx-auto p-4 bg-white rounded-md shadow-md my-8"> |
|
|
|
<section className="w-11/12 mx-auto p-4 bg-white rounded-md shadow-md my-8"> |
|
|
@ -66,7 +71,9 @@ const ProductDesign = ({ |
|
|
|
{/* product UI Design */} |
|
|
|
{/* product UI Design */} |
|
|
|
<div className="flex flex-wrap sm:flex-nowrap justify-around"> |
|
|
|
<div className="flex flex-wrap sm:flex-nowrap justify-around"> |
|
|
|
<div className="w-full flex flex-wrap items-center justify-around my-10 px-4"> |
|
|
|
<div className="w-full flex flex-wrap items-center justify-around my-10 px-4"> |
|
|
|
<div className="w-full sm:w-60 md:w-72 mx-1 rounded-lg shadow-sm border-2 border-productDesignBorderColor p-2 my-3"> |
|
|
|
<div |
|
|
|
|
|
|
|
className={`w-full sm:w-60 md:w-72 mx-1 rounded-lg shadow-sm p-2 my-3 ${productHolderBorder} ${productHolderBorderColor}`} |
|
|
|
|
|
|
|
> |
|
|
|
<div className="w-full relative"> |
|
|
|
<div className="w-full relative"> |
|
|
|
{discountPricePercent && ( |
|
|
|
{discountPricePercent && ( |
|
|
|
<div className="bg-discountPriceBg absolute left-2 top-4 rounded-md px-2 py-1"> |
|
|
|
<div className="bg-discountPriceBg absolute left-2 top-4 rounded-md px-2 py-1"> |
|
|
@ -101,16 +108,21 @@ const ProductDesign = ({ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className="mt-4"> |
|
|
|
<div className="mt-4"> |
|
|
|
<h2 |
|
|
|
<h2 |
|
|
|
className={`text-productTitle leading-4 text-base 2xl:text-lg ${productTitleAlignment}`} |
|
|
|
className={`text-productTitle leading-4 text-sm ${productTitleColor} ${productTitleAlignment}`} |
|
|
|
> |
|
|
|
> |
|
|
|
نسخه چاپی علموم تجربه هفتم |
|
|
|
نسخه چاپی علموم تجربه هفتم |
|
|
|
</h2> |
|
|
|
</h2> |
|
|
|
{productContent && ( |
|
|
|
{productContent && ( |
|
|
|
<p className="text-justify text-productContent mt-2 text-sm leading-6"> |
|
|
|
<p className="text-justify text-productContent mt-2 text-xs leading-6"> |
|
|
|
این کتاب شامل گلدان و گیاه و خاک می باشد و همچنین آپشن های خوب |
|
|
|
این کتاب شامل گلدان و گیاه و خاک می باشد و همچنین آپشن های خوب |
|
|
|
دیگری نیز دارد. |
|
|
|
دیگری نیز دارد. |
|
|
|
</p> |
|
|
|
</p> |
|
|
|
)} |
|
|
|
)} |
|
|
|
|
|
|
|
{productCat && ( |
|
|
|
|
|
|
|
<span className="text-darkCrimsonTextColor text-xs font-light"> |
|
|
|
|
|
|
|
پایه سوم |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
)} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{star && ( |
|
|
|
{star && ( |
|
|
|
<div className="flex items-center mt-2"> |
|
|
|
<div className="flex items-center mt-2"> |
|
|
@ -120,6 +132,7 @@ const ProductDesign = ({ |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
)} |
|
|
|
)} |
|
|
|
|
|
|
|
{priceHolder && ( |
|
|
|
<div |
|
|
|
<div |
|
|
|
className={`flex items-center justify-between ${priceDirection}`} |
|
|
|
className={`flex items-center justify-between ${priceDirection}`} |
|
|
|
> |
|
|
|
> |
|
|
@ -150,6 +163,7 @@ const ProductDesign = ({ |
|
|
|
اضافه کردن به سبد خرید |
|
|
|
اضافه کردن به سبد خرید |
|
|
|
</button> |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
)} |
|
|
|
{productTags && ( |
|
|
|
{productTags && ( |
|
|
|
<div className="mt-2 flex flex-wrap"> |
|
|
|
<div className="mt-2 flex flex-wrap"> |
|
|
|
<button className="rounded bg-productTagBg text-productTag m-1 px-4 py-1 text-xs"> |
|
|
|
<button className="rounded bg-productTagBg text-productTag m-1 px-4 py-1 text-xs"> |
|
|
@ -163,6 +177,9 @@ const ProductDesign = ({ |
|
|
|
</button> |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
)} |
|
|
|
)} |
|
|
|
|
|
|
|
<div className="bg-rangeBgColor h-3 w-full rounded mt-4"> |
|
|
|
|
|
|
|
<div className="bg-rangeFillBgColor h-3 w-44 rounded"></div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -172,15 +189,26 @@ const ProductDesign = ({ |
|
|
|
|
|
|
|
|
|
|
|
export default ProductDesign; |
|
|
|
export default ProductDesign; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// text colors i used for product title:
|
|
|
|
|
|
|
|
// text-darkCrimsonTextColor
|
|
|
|
|
|
|
|
// text-productTitle
|
|
|
|
|
|
|
|
|
|
|
|
ProductDesign.defaultProps = { |
|
|
|
ProductDesign.defaultProps = { |
|
|
|
colors: true, |
|
|
|
colors: false, |
|
|
|
likeBtn: true, |
|
|
|
likeBtn: false, |
|
|
|
discount: true, |
|
|
|
discount: false, |
|
|
|
discountPricePercent: true, |
|
|
|
discountPricePercent: false, |
|
|
|
discountPrice: true, |
|
|
|
discountPrice: false, |
|
|
|
productContent: true, |
|
|
|
productContent: false, |
|
|
|
star: true, |
|
|
|
star: false, |
|
|
|
productTags: true, |
|
|
|
productTags: false, |
|
|
|
|
|
|
|
priceHolder: false, |
|
|
|
|
|
|
|
productCat: true, |
|
|
|
|
|
|
|
productTitleColor: "text-darkCrimsonTextColor", |
|
|
|
|
|
|
|
productHolderBorder: "border-0", |
|
|
|
|
|
|
|
productHolderBorderColor: "border-grayBorderColor", |
|
|
|
priceDirection: "flex-row", |
|
|
|
priceDirection: "flex-row", |
|
|
|
productTitleAlignment: "text-justify", |
|
|
|
productTitleAlignment: "text-justify", |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// border-2 border-productDesignBorderColor
|
|
|
|