parent
2783de1eb2
commit
f2ff990cad
9 changed files with 33919 additions and 10849 deletions
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
@ -1,64 +1,70 @@ |
|||||||
import React from "react"; |
import React from "react"; |
||||||
|
|
||||||
import circleTick from '../ProductStatusCard/tick-circle.svg'; |
import circleTick from "../ProductStatusCard/tick-circle.svg"; |
||||||
import shieldTick from '../ProductStatusCard/shield-tick.svg'; |
import shieldTick from "../ProductStatusCard/shield-tick.svg"; |
||||||
import linearGroup from '../ProductStatusCard/delivery-icon.svg'; |
import linearGroup from "../ProductStatusCard/delivery-icon.svg"; |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const AddToCartCard = ({ |
const AddToCartCard = ({ |
||||||
numberOfSuggest, |
numberOfSuggest, |
||||||
sendingTime, |
sendingTime, |
||||||
button, |
button, |
||||||
price, |
price, |
||||||
profit, |
profit, |
||||||
showProduct, |
showProduct, |
||||||
productName, |
productName, |
||||||
productImg, |
productImg, |
||||||
productCat |
productCat, |
||||||
}) =>{ |
}) => { |
||||||
const specialities = [ |
const specialities = [ |
||||||
{ |
{ |
||||||
icon: circleTick, |
icon: circleTick, |
||||||
description: ` توصیه به خرید توسط ${numberOfSuggest} نفر`, |
description: ` توصیه به خرید توسط ${numberOfSuggest} نفر`, |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
icon: linearGroup, |
icon: linearGroup, |
||||||
description: `زمان ارسال ${sendingTime} روز کاری پس از سفارش`, |
description: `زمان ارسال ${sendingTime} روز کاری پس از سفارش`, |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
icon: shieldTick, |
icon: shieldTick, |
||||||
description: `گارانتی اصالت و سلامت فیزیکی`, |
description: `گارانتی اصالت و سلامت فیزیکی`, |
||||||
} |
}, |
||||||
]; |
]; |
||||||
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 "> |
||||||
{ |
{showProduct && ( |
||||||
showProduct && <div className="flex w-full max-w-8 overflow-hidden items-center py-4 m-0 justify-center"> |
<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 |
||||||
<div className="text-sm">
|
src={productImg} |
||||||
<h1 className="text-sm">{productName}</h1> |
alt="" |
||||||
<p className=" text-xs pt-2 text-blueC0">{productCat}</p> |
style={{ maxWidth: "100px" }} |
||||||
</div> |
className=" bg-grayF4 py-2 px-4 bg-grayF4 rounded ml-4" |
||||||
</div> |
/> |
||||||
} |
<div className="text-sm"> |
||||||
{specialities.map((item, index) => ( |
<h1 className="text-sm">{productName}</h1> |
||||||
<div className="flex items-center p-2 w-full border-0 border-b border-solid border-gray-300"> |
<p className=" text-xs pt-2 text-blueC0">{productCat}</p> |
||||||
{item.icon && <img src={item.icon} className="pl-3" />} |
</div> |
||||||
<p className="text-sm text-blue52 text-right">{item.description}</p> |
</div> |
||||||
</div> |
)} |
||||||
))} |
{specialities.map((item, index) => ( |
||||||
<div className="w-full flex flex-col items-center justify-center p-4"> |
<div className="flex items-center p-2 w-full border-0 border-b border-solid border-gray-300"> |
||||||
<h1 className="text-xl text-gray-500"> |
{item.icon && <img src={item.icon} alt="" className="pl-3" />} |
||||||
<span className=" text-blueC0"> {price} </span> |
<p className="text-sm text-blue52 text-right">{item.description}</p> |
||||||
تومان </h1> |
|
||||||
{ profit && <h5 className="text-xs p-2 pb-0 text-blue52">با خرید این کالا {profit} تومان سود کنید</h5>} |
|
||||||
</div> |
|
||||||
<div className="w-full flex justify-center"> |
|
||||||
{button} |
|
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
); |
))} |
||||||
|
<div className="w-full flex flex-col items-center justify-center p-4"> |
||||||
|
<h1 className="text-xl text-gray-500"> |
||||||
|
<span className=" text-blueC0"> {price} </span> |
||||||
|
تومان |
||||||
|
</h1> |
||||||
|
{profit && ( |
||||||
|
<h5 className="text-xs p-2 pb-0 text-blue52"> |
||||||
|
با خرید این کالا {profit} تومان سود کنید |
||||||
|
</h5> |
||||||
|
)} |
||||||
|
</div> |
||||||
|
<div className="w-full flex justify-center">{button}</div> |
||||||
|
</div> |
||||||
|
); |
||||||
}; |
}; |
||||||
|
|
||||||
export default AddToCartCard; |
export default AddToCartCard; |
||||||
|
@ -1,16 +1,17 @@ |
|||||||
@tailwind base; |
@tailwind base; |
||||||
@tailwind components; |
@tailwind components; |
||||||
@tailwind utilities; |
@tailwind utilities; |
||||||
|
|
||||||
body { |
body { |
||||||
margin: 0; |
margin: 0; |
||||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', |
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", |
||||||
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', |
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", |
||||||
sans-serif; |
sans-serif; |
||||||
-webkit-font-smoothing: antialiased; |
-webkit-font-smoothing: antialiased; |
||||||
-moz-osx-font-smoothing: grayscale; |
-moz-osx-font-smoothing: grayscale; |
||||||
} |
} |
||||||
|
|
||||||
code { |
code { |
||||||
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', |
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", |
||||||
monospace; |
monospace; |
||||||
} |
} |
||||||
|
@ -1,11 +1,15 @@ |
|||||||
module.exports = { |
module.exports = { |
||||||
purge: ['./src/**/*.{js,jsx,ts,tsx}', './public/index.html'], |
purge: ["./src/**/*.{js,jsx,ts,tsx}", "./public/index.html"], |
||||||
darkMode: 'class', // or 'media' or 'class'
|
darkMode: "class", // or 'media' or 'class'
|
||||||
theme: { |
theme: { |
||||||
extend: {}, |
extend: { |
||||||
|
fontFamily: { |
||||||
|
sansbold: ["sansbold"], |
||||||
|
}, |
||||||
|
}, |
||||||
}, |
}, |
||||||
variants: { |
variants: { |
||||||
extend: {}, |
extend: {}, |
||||||
}, |
}, |
||||||
plugins: [], |
plugins: [], |
||||||
} |
}; |
||||||
|
Loading…
Reference in new issue