|
|
@ -1,10 +1,18 @@ |
|
|
|
import React from "react"; |
|
|
|
import React from "react"; |
|
|
|
|
|
|
|
import "./ProductTags.scss"; |
|
|
|
|
|
|
|
|
|
|
|
import blackCancleIcon from "../../assets/icons/black-cancle-icon.svg"; |
|
|
|
import blackCancleIcon from "../../assets/icons/black-cancle-icon.svg"; |
|
|
|
import blackDeliveryIcon from "../../assets/icons/black-delivery-icon.svg"; |
|
|
|
import blackDeliveryIcon from "../../assets/icons/black-delivery-icon.svg"; |
|
|
|
import blackRightIcon from "../../assets/icons/black-right-icon.svg"; |
|
|
|
import blackRightIcon from "../../assets/icons/black-right-icon.svg"; |
|
|
|
|
|
|
|
|
|
|
|
const ProductTags = ({ tagtitlecolor }) => { |
|
|
|
const ProductTags = ({ |
|
|
|
|
|
|
|
tagtitlecolor, |
|
|
|
|
|
|
|
tagBgColor, |
|
|
|
|
|
|
|
tagBorderColor, |
|
|
|
|
|
|
|
deliveryIcon, |
|
|
|
|
|
|
|
rightIcon, |
|
|
|
|
|
|
|
cancleIcon, |
|
|
|
|
|
|
|
}) => { |
|
|
|
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"> |
|
|
|
<div className="flex items-center justify-between mb-6"> |
|
|
|
<div className="flex items-center justify-between mb-6"> |
|
|
@ -17,150 +25,18 @@ const ProductTags = ({ tagtitlecolor }) => { |
|
|
|
{/* 1 */} |
|
|
|
{/* 1 */} |
|
|
|
<div className="mt-2 flex flex-wrap w-1/5 "> |
|
|
|
<div className="mt-2 flex flex-wrap w-1/5 "> |
|
|
|
<button |
|
|
|
<button |
|
|
|
className={`rounded border border-productTagBorderColor1 m-1 px-4 py-1 text-xs ${tagtitlecolor}`} |
|
|
|
className={`product-tag-button ${tagtitlecolor} ${tagBorderColor} ${tagBgColor} `} |
|
|
|
> |
|
|
|
> |
|
|
|
ارسال رایگان |
|
|
|
{deliveryIcon && ( |
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="rounded text-cancleButtonTextColor border border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
برچسب های دیگر |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="rounded text-cancleButtonTextColor border border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
امتحان سخت |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="rounded text-cancleButtonTextColor border border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
بسته بندی به صورت کادو |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="rounded text-cancleButtonTextColor border border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
امتحان آسان |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="rounded text-cancleButtonTextColor border border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
بسته بندی به صورت کادو |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="rounded text-cancleButtonTextColor border border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
آزمون |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
{/* 2 */} |
|
|
|
|
|
|
|
<div className="mt-2 flex flex-wrap w-1/5 "> |
|
|
|
|
|
|
|
<button className=" rounded text-moreInfoButtonTextColor border border-moreInfoButtonBorderColor m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
ارسال رایگان |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="rounded text-cancleButtonTextColor border border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
برچسب های دیگر |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="rounded text-cancleButtonTextColor border border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
امتحان سخت |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="rounded text-cancleButtonTextColor border border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
بسته بندی به صورت کادو |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="rounded text-moreInfoButtonTextColor border border-moreInfoButtonBorderColor m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
امتحان آسان |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="rounded text-moreInfoButtonTextColor border border-moreInfoButtonBorderColor m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
بسته بندی به صورت کادو |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="rounded text-cancleButtonTextColor border border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
آزمون |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
{/* 3 */} |
|
|
|
|
|
|
|
<div className="mt-2 flex flex-wrap w-1/5 "> |
|
|
|
|
|
|
|
<button className="flex items-center rounded text-cancleButtonTextColor border-2 border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
ارسال رایگان |
|
|
|
|
|
|
|
<img src={blackCancleIcon} alt="" className="mr-2 w-2" /> |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="flex items-center rounded text-cancleButtonTextColor border-2 border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
برچسب های دیگر |
|
|
|
|
|
|
|
<img src={blackCancleIcon} alt="" className="mr-2 w-2" /> |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="flex items-center rounded text-cancleButtonTextColor border-2 border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
امتحان سخت |
|
|
|
|
|
|
|
<img src={blackCancleIcon} alt="" className="mr-2 w-2" /> |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="flex items-center rounded text-cancleButtonTextColor border-2 border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
بسته بندی به صورت کادو |
|
|
|
|
|
|
|
<img src={blackCancleIcon} alt="" className="mr-2 w-2" /> |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="flex items-center rounded text-cancleButtonTextColor border-2 border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
امتحان آسان |
|
|
|
|
|
|
|
<img src={blackCancleIcon} alt="" className="mr-2 w-2" /> |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="flex items-center rounded text-cancleButtonTextColor border-2 border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
بسته بندی به صورت کادو |
|
|
|
|
|
|
|
<img src={blackCancleIcon} alt="" className="mr-2 w-2" /> |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="flex items-center rounded text-cancleButtonTextColor border-2 border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
آزمون |
|
|
|
|
|
|
|
<img src={blackCancleIcon} alt="" className="mr-2 w-2" /> |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
{/* 4 */} |
|
|
|
|
|
|
|
<div className="mt-2 flex flex-wrap w-1/5 "> |
|
|
|
|
|
|
|
<button className="flex items-center rounded text-cancleButtonTextColor border-2 border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
ارسال رایگان |
|
|
|
|
|
|
|
<img src={blackCancleIcon} alt="" className="mr-2 w-2" /> |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="flex items-center rounded text-cancleButtonTextColor border-2 border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
برچسب های دیگر |
|
|
|
|
|
|
|
<img src={blackCancleIcon} alt="" className="mr-2 w-2" /> |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="flex items-center rounded text-cancleButtonTextColor border-2 border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
امتحان سخت |
|
|
|
|
|
|
|
<img src={blackCancleIcon} alt="" className="mr-2 w-2" /> |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="flex items-center rounded text-cancleButtonTextColor border-2 border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
بسته بندی به صورت کادو |
|
|
|
|
|
|
|
<img src={blackCancleIcon} alt="" className="mr-2 w-2" /> |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="flex items-center rounded text-cancleButtonTextColor border-2 border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
امتحان آسان |
|
|
|
|
|
|
|
<img src={blackCancleIcon} alt="" className="mr-2 w-2" /> |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="flex items-center rounded text-cancleButtonTextColor border-2 border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
بسته بندی به صورت کادو |
|
|
|
|
|
|
|
<img src={blackCancleIcon} alt="" className="mr-2 w-2" /> |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="flex items-center rounded text-cancleButtonTextColor border-2 border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
آزمون |
|
|
|
|
|
|
|
<img src={blackCancleIcon} alt="" className="mr-2 w-2" /> |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
{/* 5 */} |
|
|
|
|
|
|
|
<div className="mt-2 flex flex-wrap w-1/5 "> |
|
|
|
|
|
|
|
<button className="flex items-center rounded text-cancleButtonTextColor border-2 border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
<img src={blackDeliveryIcon} alt="" className="ml-1 w-3" /> |
|
|
|
<img src={blackDeliveryIcon} alt="" className="ml-1 w-3" /> |
|
|
|
ارسال رایگان |
|
|
|
)} |
|
|
|
<img src={blackCancleIcon} alt="" className="mr-2 w-2" /> |
|
|
|
{rightIcon && ( |
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="flex items-center rounded text-cancleButtonTextColor border-2 border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
<img src={blackRightIcon} alt="" className="ml-1 w-3" /> |
|
|
|
<img src={blackRightIcon} alt="" className="ml-1 w-3" /> |
|
|
|
|
|
|
|
)} |
|
|
|
ارسال رایگان |
|
|
|
ارسال رایگان |
|
|
|
|
|
|
|
{cancleIcon && ( |
|
|
|
<img src={blackCancleIcon} alt="" className="mr-2 w-2" /> |
|
|
|
<img src={blackCancleIcon} alt="" className="mr-2 w-2" /> |
|
|
|
</button> |
|
|
|
)} |
|
|
|
<button className="flex items-center rounded text-cancleButtonTextColor border-2 border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
برچسب های دیگر |
|
|
|
|
|
|
|
<img src={blackCancleIcon} alt="" className="mr-2 w-2" /> |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="flex items-center rounded text-cancleButtonTextColor border-2 border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
امتحان سخت |
|
|
|
|
|
|
|
<img src={blackCancleIcon} alt="" className="mr-2 w-2" /> |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="flex items-center rounded text-cancleButtonTextColor border-2 border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
بسته بندی به صورت کادو |
|
|
|
|
|
|
|
<img src={blackCancleIcon} alt="" className="mr-2 w-2" /> |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="flex items-center rounded text-cancleButtonTextColor border-2 border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
امتحان آسان |
|
|
|
|
|
|
|
<img src={blackCancleIcon} alt="" className="mr-2 w-2" /> |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="flex items-center rounded text-cancleButtonTextColor border-2 border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
بسته بندی به صورت کادو |
|
|
|
|
|
|
|
<img src={blackCancleIcon} alt="" className="mr-2 w-2" /> |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<button className="flex items-center rounded text-cancleButtonTextColor border-2 border-productTagBorderColor1 m-1 px-4 py-1 text-xs"> |
|
|
|
|
|
|
|
آزمون |
|
|
|
|
|
|
|
<img src={blackCancleIcon} alt="" className="mr-2 w-2" /> |
|
|
|
|
|
|
|
</button> |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -170,6 +46,38 @@ const ProductTags = ({ tagtitlecolor }) => { |
|
|
|
|
|
|
|
|
|
|
|
export default ProductTags; |
|
|
|
export default ProductTags; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// color classes that i defined in tailwind.config.js and we can use for text color:
|
|
|
|
|
|
|
|
// 1 ----> text-lightBlueTextColor
|
|
|
|
|
|
|
|
// 2 ----> text-grayTextColor
|
|
|
|
|
|
|
|
// 3 ----> text-lightOrangeTextColor
|
|
|
|
|
|
|
|
// 4 ----> text-lightYellowTextColor
|
|
|
|
|
|
|
|
// 4 ----> text-lightGreenTextColor
|
|
|
|
|
|
|
|
// 4 ----> text-lightPurpleTextColor
|
|
|
|
|
|
|
|
// 5 ----> text-darkBlueTextColor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// color classes that i defined in tailwind.config.js and we can use for background color:
|
|
|
|
|
|
|
|
// 1 ----> bg-productTagBg
|
|
|
|
|
|
|
|
// 2 ----> bg-lightOrangeBgColor
|
|
|
|
|
|
|
|
// 3 ----> bg-lightYellowBgColor
|
|
|
|
|
|
|
|
// 4 ----> bg-lightBlueBgColor
|
|
|
|
|
|
|
|
// 4 ----> bg-lightGreenBgColor
|
|
|
|
|
|
|
|
// 4 ----> bg-lightPurpleBgColor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// color classes that i defined in tailwind.config.js and we can use for border color:
|
|
|
|
|
|
|
|
// 1 ----> border-lightBlueBorderColor
|
|
|
|
|
|
|
|
// 2 ----> border-grayBorderColor
|
|
|
|
|
|
|
|
// 3 ----> border-lightOrangeBorderColor
|
|
|
|
|
|
|
|
// 4 ----> border-lightYellowBorderColor
|
|
|
|
|
|
|
|
// 5 ----> border-lightGreenBorderColor
|
|
|
|
|
|
|
|
// 5 ----> border-lightPurpleBorderColor
|
|
|
|
|
|
|
|
// 6 ----> border-darkBlueBorderColor
|
|
|
|
|
|
|
|
|
|
|
|
ProductTags.defaultProps = { |
|
|
|
ProductTags.defaultProps = { |
|
|
|
tagtitlecolor: "text-red-400", |
|
|
|
tagtitlecolor: "text-lightPurpleTextColor", |
|
|
|
|
|
|
|
tagBgColor: "bg-lightPurpleBgColor", |
|
|
|
|
|
|
|
tagBorderColor: "border-lightPurpleBorderColor", |
|
|
|
|
|
|
|
// for icons
|
|
|
|
|
|
|
|
deliveryIcon: true, |
|
|
|
|
|
|
|
rightIcon: false, |
|
|
|
|
|
|
|
cancleIcon: true, |
|
|
|
}; |
|
|
|
}; |
|
|
|