Add to Cart Footer Added

temp
Pedram Keshavarzi 3 years ago
parent b522fcea32
commit b3f91e4785
  1. 20
      src/components/AddToCart/index.js
  2. 4
      src/views/Product/Desktop/ProductOverAll/index.js

@ -15,7 +15,8 @@ const AddToCartCard = ({
showProduct, showProduct,
productName, productName,
productImg, productImg,
productCat productCat,
footer
}) =>{ }) =>{
const specialities = [ const specialities = [
{ {
@ -32,7 +33,8 @@ const AddToCartCard = ({
} }
]; ];
return( return(
<div className="felx flex-col bg-grayF7 p-4 pt-0 w-full mx-4 items-center justify-center "> <>
<div className="felx flex-col bg-grayF7 p-4 pt-0 w-full mx-4 items-center justify-center max-w-xs">
{ {
showProduct && <div className="flex w-full max-w-8 overflow-hidden items-center py-4 m-0 justify-center"> showProduct && <div className="flex w-full max-w-8 overflow-hidden items-center py-4 m-0 justify-center">
<img src={productImg} style={{maxWidth:'100px'}} className=" bg-grayF4 py-2 px-4 bg-grayF4 rounded ml-4" /> <img src={productImg} style={{maxWidth:'100px'}} className=" bg-grayF4 py-2 px-4 bg-grayF4 rounded ml-4" />
@ -58,6 +60,20 @@ const AddToCartCard = ({
{button} {button}
</div> </div>
</div> </div>
{footer &&
<div className="flex bg-grayF7 p-4 w-full mx-4 items-center mt-4 max-w-xs">
{
footer == 'SendBack' &&
<>
<img src={specialities[0].icon} className="pl-3"/>
<div className="text-sm">
<h3 className="text-blue52">بازگشت بی چون و چرا</h3>
<p>ما خیلی خوب هستیم و دوستتون داریم در صورتی که از کالایی خوشتون نیومد میتونید بی قید و شرط بسش بدید</p>
</div>
</>
}
</div>}
</>
); );
}; };

@ -118,7 +118,7 @@ export const ProductOverAll = ({
sendingTime={20} sendingTime={20}
numberOfSuggest={160} numberOfSuggest={160}
profit={12000} profit={12000}
showProduct // showProduct
productCat={grades[book?.gradeId]} productCat={grades[book?.gradeId]}
productImg={`https://dnvn.ir/api/v1/file/${book?.fileIds}`} productImg={`https://dnvn.ir/api/v1/file/${book?.fileIds}`}
productName={type === "digital" productName={type === "digital"
@ -147,6 +147,8 @@ export const ProductOverAll = ({
/> />
} }
footer='SendBack'
/> />
</div> </div>

Loading…
Cancel
Save