parent
fd29c0276e
commit
224b954407
12 changed files with 88 additions and 10 deletions
After Width: | Height: | Size: 981 B |
After Width: | Height: | Size: 967 B |
After Width: | Height: | Size: 249 B |
After Width: | Height: | Size: 200 B |
@ -1,3 +0,0 @@ |
||||
.btnUiDesign { |
||||
@apply flex items-center text-sm md:text-base; |
||||
} |
@ -0,0 +1,61 @@ |
||||
import React from "react"; |
||||
import "./CounterDesign.scss"; |
||||
|
||||
import blackDisLikeIcon from "../../assets/icons/black-dislike-icon.svg"; |
||||
import blackLikeIcon from "../../assets/icons/black-like-icon.svg"; |
||||
import decrementCounterIcon from "../../assets/icons/decrement-counter-icon.svg"; |
||||
import incrementCounterIcon from "../../assets/icons/increment-counter-icon.svg"; |
||||
|
||||
// {deliveryIcon && (
|
||||
// <img src={blackDeliveryIcon} alt="" className="ml-1 w-3" />
|
||||
// )}
|
||||
|
||||
const CounterDesign = ({ |
||||
counterColor, |
||||
counterIncreaseBtn, |
||||
counterDecreaseBtn, |
||||
likeBtn, |
||||
}) => { |
||||
return ( |
||||
<section className="w-11/12 mx-auto p-4 bg-white rounded-md shadow-md my-8"> |
||||
<div className="flex items-center justify-between mb-6"> |
||||
<h2 className="text-base bg-blue-300 rounded-full shadow-md shadow-blue-900 text-white p-2"> |
||||
طراحی کانتر |
||||
</h2> |
||||
</div> |
||||
<div className="flex-col items-center justify-center"> |
||||
{likeBtn && ( |
||||
<div className="flex items-center"> |
||||
<img src={blackLikeIcon} alt="" className="w-8 mb-4" /> |
||||
<img src={blackDisLikeIcon} alt="" className="w-8 mb-4" /> |
||||
</div> |
||||
)} |
||||
{counterIncreaseBtn && ( |
||||
<img src={incrementCounterIcon} alt="" className="w-8 mb-4" /> |
||||
)} |
||||
<p |
||||
className={` text-sm sm:text-base md:text-2xl font-bold ${counterColor} `} |
||||
> |
||||
561 |
||||
</p> |
||||
{counterDecreaseBtn && ( |
||||
<img src={decrementCounterIcon} alt="" className="w-8 mt-4" /> |
||||
)} |
||||
</div> |
||||
</section> |
||||
); |
||||
}; |
||||
|
||||
export default CounterDesign; |
||||
|
||||
// color classes that i defined in tailwind.config.js and we can use for text color:
|
||||
// ----> text-lightBlueTextColor
|
||||
// ----> text-darkRedTextColor
|
||||
|
||||
CounterDesign.defaultProps = { |
||||
counterColor: "text-darkRedTextColor", |
||||
// for icons
|
||||
likeBtn: false, |
||||
counterIncreaseBtn: true, |
||||
counterDecreaseBtn: true, |
||||
}; |
@ -1,3 +0,0 @@ |
||||
.product-tag-button { |
||||
@apply flex items-center rounded border-2 m-1 px-4 py-1 text-xs; |
||||
} |
Loading…
Reference in new issue