|
|
@ -32,6 +32,9 @@ const VodProductDesign = ({ |
|
|
|
productTitleColor, |
|
|
|
productTitleColor, |
|
|
|
productCat, |
|
|
|
productCat, |
|
|
|
rangeHolder, |
|
|
|
rangeHolder, |
|
|
|
|
|
|
|
priceTitle, |
|
|
|
|
|
|
|
productPriceAmountTitle, |
|
|
|
|
|
|
|
addToCartHolder, |
|
|
|
verticalImg, |
|
|
|
verticalImg, |
|
|
|
horizontalImg, |
|
|
|
horizontalImg, |
|
|
|
}) => { |
|
|
|
}) => { |
|
|
@ -55,6 +58,7 @@ const VodProductDesign = ({ |
|
|
|
<div |
|
|
|
<div |
|
|
|
className={`w-full sm:w-60 md:w-96 mx-1 rounded-lg shadow-sm p-2 my-3 ${productHolderBorder} ${productHolderBorderColor}`} |
|
|
|
className={`w-full sm:w-60 md:w-96 mx-1 rounded-lg shadow-sm p-2 my-3 ${productHolderBorder} ${productHolderBorderColor}`} |
|
|
|
> |
|
|
|
> |
|
|
|
|
|
|
|
{/* img */} |
|
|
|
<div |
|
|
|
<div |
|
|
|
className="w-full relative flex items-center justify-center cursor-pointer" |
|
|
|
className="w-full relative flex items-center justify-center cursor-pointer" |
|
|
|
style={{ |
|
|
|
style={{ |
|
|
@ -79,7 +83,8 @@ const VodProductDesign = ({ |
|
|
|
)} |
|
|
|
)} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className="px-2"> |
|
|
|
<div className="px-2"> |
|
|
|
<div className="mt-4"> |
|
|
|
{/* content */} |
|
|
|
|
|
|
|
<div className="mt-4 flex justify-between items-center"> |
|
|
|
<h2 |
|
|
|
<h2 |
|
|
|
className={`text-productTitle leading-4 text-sm ${productTitleColor} ${productTitleAlignment}`} |
|
|
|
className={`text-productTitle leading-4 text-sm ${productTitleColor} ${productTitleAlignment}`} |
|
|
|
> |
|
|
|
> |
|
|
@ -97,14 +102,8 @@ const VodProductDesign = ({ |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
)} |
|
|
|
)} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{star && ( |
|
|
|
{/* price */} |
|
|
|
<div className="flex items-center mt-2"> |
|
|
|
<div className="flex items-center justify-between mt-2"> |
|
|
|
<StarRating /> |
|
|
|
|
|
|
|
<span className="text-xs text-productContent font-bold mr-2"> |
|
|
|
|
|
|
|
39 |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
{priceHolder && ( |
|
|
|
{priceHolder && ( |
|
|
|
<div |
|
|
|
<div |
|
|
|
className={`flex items-center justify-between ${priceDirection}`} |
|
|
|
className={`flex items-center justify-between ${priceDirection}`} |
|
|
@ -113,23 +112,30 @@ const VodProductDesign = ({ |
|
|
|
<div className="mt-2"> |
|
|
|
<div className="mt-2"> |
|
|
|
<div |
|
|
|
<div |
|
|
|
className={`${ |
|
|
|
className={`${ |
|
|
|
priceDirection.indexOf("col") !== -1 ? "inline" : "flex" |
|
|
|
priceDirection.indexOf("col") !== -1 |
|
|
|
|
|
|
|
? "inline" |
|
|
|
|
|
|
|
: "flex" |
|
|
|
}`}
|
|
|
|
}`}
|
|
|
|
> |
|
|
|
> |
|
|
|
|
|
|
|
{priceTitle && ( |
|
|
|
<span className="text-xs text-borderColor ml-2"> |
|
|
|
<span className="text-xs text-borderColor ml-2"> |
|
|
|
قیمت |
|
|
|
قیمت |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
|
|
|
|
)} |
|
|
|
{discountPrice && ( |
|
|
|
{discountPrice && ( |
|
|
|
<p className="line-through text-xs text-borderColor mr-2"> |
|
|
|
<p className="line-through text-xs text-borderColor mr-2"> |
|
|
|
145<span>تومان</span> |
|
|
|
145<span>تومان</span> |
|
|
|
</p> |
|
|
|
</p> |
|
|
|
)} |
|
|
|
)} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<p className="text-sm text-productPrice font-semibold inline"> |
|
|
|
<p |
|
|
|
|
|
|
|
className={`text-sm font-semibold inline ${productPriceAmountTitle}`} |
|
|
|
|
|
|
|
> |
|
|
|
145.000<span>تومان</span> |
|
|
|
145.000<span>تومان</span> |
|
|
|
</p> |
|
|
|
</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{/* add to cart */} |
|
|
|
{/* add to cart */} |
|
|
|
|
|
|
|
{addToCartHolder && ( |
|
|
|
<button |
|
|
|
<button |
|
|
|
className={`rounded-2xl px-2 py-3 border text-xs text-productPrice mt-2 ${ |
|
|
|
className={`rounded-2xl px-2 py-3 border text-xs text-productPrice mt-2 ${ |
|
|
|
priceDirection.indexOf("col") !== -1 ? "w-full" : "" |
|
|
|
priceDirection.indexOf("col") !== -1 ? "w-full" : "" |
|
|
@ -137,8 +143,18 @@ const VodProductDesign = ({ |
|
|
|
> |
|
|
|
> |
|
|
|
اضافه کردن به سبد خرید |
|
|
|
اضافه کردن به سبد خرید |
|
|
|
</button> |
|
|
|
</button> |
|
|
|
|
|
|
|
)} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
)} |
|
|
|
)} |
|
|
|
|
|
|
|
{star && ( |
|
|
|
|
|
|
|
<div className="flex items-center mt-2"> |
|
|
|
|
|
|
|
<StarRating /> |
|
|
|
|
|
|
|
<span className="text-xs text-productContent font-bold mr-2"> |
|
|
|
|
|
|
|
39 |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
</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"> |
|
|
@ -153,7 +169,7 @@ const VodProductDesign = ({ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
)} |
|
|
|
)} |
|
|
|
{rangeHolder && ( |
|
|
|
{rangeHolder && ( |
|
|
|
<div className="bg-rangeBgColor h-3 w-full rounded mt-2"> |
|
|
|
<div className="bg-rangeBgColor h-3 w-full rounded mt-4"> |
|
|
|
<div className="bg-rangeFillBgColor h-3 w-44 rounded"></div> |
|
|
|
<div className="bg-rangeFillBgColor h-3 w-44 rounded"></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
)} |
|
|
|
)} |
|
|
@ -167,6 +183,9 @@ const VodProductDesign = ({ |
|
|
|
|
|
|
|
|
|
|
|
export default VodProductDesign; |
|
|
|
export default VodProductDesign; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// text colors i used:
|
|
|
|
|
|
|
|
// text-productPrice
|
|
|
|
|
|
|
|
|
|
|
|
VodProductDesign.defaultProps = { |
|
|
|
VodProductDesign.defaultProps = { |
|
|
|
colors: false, |
|
|
|
colors: false, |
|
|
|
likeBtn: false, |
|
|
|
likeBtn: false, |
|
|
@ -174,15 +193,19 @@ VodProductDesign.defaultProps = { |
|
|
|
discountPricePercent: false, |
|
|
|
discountPricePercent: false, |
|
|
|
discountPrice: false, |
|
|
|
discountPrice: false, |
|
|
|
productContent: false, |
|
|
|
productContent: false, |
|
|
|
star: false, |
|
|
|
star: true, |
|
|
|
productTags: false, |
|
|
|
productTags: false, |
|
|
|
priceHolder: false, |
|
|
|
priceHolder: true, |
|
|
|
|
|
|
|
priceTitle: false, |
|
|
|
productCat: true, |
|
|
|
productCat: true, |
|
|
|
rangeHolder: true, |
|
|
|
rangeHolder: true, |
|
|
|
verticalImg: false, |
|
|
|
verticalImg: false, |
|
|
|
horizontalImg: true, |
|
|
|
horizontalImg: true, |
|
|
|
|
|
|
|
addToCartHolder: false, |
|
|
|
|
|
|
|
|
|
|
|
productTitleColor: "text-darkCrimsonTextColor", |
|
|
|
productTitleColor: "text-darkCrimsonTextColor", |
|
|
|
productHolderBorder: "border-0", |
|
|
|
productPriceAmountTitle: "text-productPrice", |
|
|
|
|
|
|
|
productHolderBorder: "border", |
|
|
|
productHolderBorderColor: "border-grayBorderColor", |
|
|
|
productHolderBorderColor: "border-grayBorderColor", |
|
|
|
productTitleAlignment: "text-justify", |
|
|
|
productTitleAlignment: "text-justify", |
|
|
|
|
|
|
|
|
|
|
|