master
mahdi 3 years ago
parent 253a2ac186
commit 93e0b6d26d
  1. 9
      src/assets/icons/black-settings-icon.svg
  2. 11
      src/assets/icons/dark-blue-newspaper-icon.svg
  3. 12
      src/assets/icons/light-green-gift-icon.svg
  4. 10
      src/assets/icons/light-purple-double-right-icon.svg
  5. 76
      src/components/productTags/ProductTags.js

@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16.443" height="16.443" viewBox="0 0 16.443 16.443">
<g id="vuesax_linear_setting-2" data-name="vuesax/linear/setting-2" transform="translate(-300 -188)">
<g id="setting-2" transform="translate(300 188)">
<path id="Vector" d="M4.111,2.055A2.055,2.055,0,1,1,2.055,0,2.055,2.055,0,0,1,4.111,2.055Z" transform="translate(6.166 6.166)" fill="none" stroke="#646464" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path id="Vector-2" data-name="Vector" d="M0,7.07V5.864a1.306,1.306,0,0,1,1.3-1.3c1.24,0,1.747-.877,1.124-1.953A1.3,1.3,0,0,1,2.9.835L4.09.157A1.144,1.144,0,0,1,5.652.568L5.728.7A1.191,1.191,0,0,0,7.982.7l.075-.13A1.144,1.144,0,0,1,9.619.157L10.8.835a1.3,1.3,0,0,1,.48,1.775c-.623,1.076-.116,1.953,1.124,1.953a1.306,1.306,0,0,1,1.3,1.3V7.07a1.306,1.306,0,0,1-1.3,1.3c-1.24,0-1.747.877-1.124,1.953A1.3,1.3,0,0,1,10.8,12.1l-1.185.678a1.144,1.144,0,0,1-1.562-.411l-.075-.13a1.191,1.191,0,0,0-2.254,0l-.075.13a1.144,1.144,0,0,1-1.562.411L2.9,12.1a1.3,1.3,0,0,1-.48-1.775c.623-1.076.116-1.953-1.124-1.953A1.306,1.306,0,0,1,0,7.07Z" transform="translate(1.37 1.755)" fill="none" stroke="#646464" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path id="Vector-3" data-name="Vector" d="M0,0H16.443V16.443H0Z" fill="none" opacity="0"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16.062" height="15.887" viewBox="0 0 16.062 15.887">
<g id="vuesax_linear_book" data-name="vuesax/linear/book" transform="translate(-492 -188)">
<g id="book" transform="translate(492 188)">
<path id="Vector" d="M11.429,10.591V3.31C11.429.662,10.756,0,8.067,0H3.361C.672,0,0,.662,0,3.31V9.929c0,.093,0,.185.007.278" transform="translate(2.317 1.324)" fill="none" stroke="#0615ce" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path id="Vector-2" data-name="Vector" d="M9.513,0H0V2.317A2.338,2.338,0,0,0,2.353,4.634H9.076a2.338,2.338,0,0,0,2.353-2.317v-.43A1.9,1.9,0,0,0,9.513,0Z" transform="translate(2.317 9.929)" fill="none" stroke="#0615ce" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path id="Vector-3" data-name="Vector" d="M5.3,0H0" transform="translate(5.383 4.634)" fill="none" stroke="#0615ce" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path id="Vector-4" data-name="Vector" d="M3.31,0H0" transform="translate(7.383 6.95)" fill="none" stroke="#0615ce" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path id="Vector-5" data-name="Vector" d="M16.062,15.887H0V0H16.062Z" transform="translate(0 0)" fill="none" opacity="0"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" width="15.887" height="15.887" viewBox="0 0 15.887 15.887">
<g id="vuesax_linear_gift" data-name="vuesax/linear/gift" transform="translate(-236 -252)">
<g id="gift" transform="translate(236 252)">
<path id="Vector" d="M10.591,0H0V5.3C0,7.281.662,7.943,2.648,7.943h5.3c1.986,0,2.648-.662,2.648-2.648Z" transform="translate(2.628 6.619)" fill="none" stroke="#c8ee49" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path id="Vector-2" data-name="Vector" d="M12.577,1.324v.662A1.194,1.194,0,0,1,11.253,3.31H1.324A1.176,1.176,0,0,1,0,1.986V1.324A1.176,1.176,0,0,1,1.324,0h9.929A1.194,1.194,0,0,1,12.577,1.324Z" transform="translate(1.655 3.31)" fill="none" stroke="#c8ee49" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path id="Vector-3" data-name="Vector" d="M3.818,1.984H.164a.62.62,0,0,1,.02-.861l.94-.94a.635.635,0,0,1,.894,0Z" transform="translate(3.887 1.326)" fill="none" stroke="#c8ee49" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path id="Vector-4" data-name="Vector" d="M3.654,1.984H0L1.8.184a.635.635,0,0,1,.894,0l.94.94A.62.62,0,0,1,3.654,1.984Z" transform="translate(8.175 1.326)" fill="none" stroke="#c8ee49" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path id="Vector-5" data-name="Vector" d="M0,0V3.4a.663.663,0,0,0,1.026.556l.622-.41a.661.661,0,0,1,.728,0l.589.4A.66.66,0,0,0,3.992,3.4V0Z" transform="translate(5.918 6.619)" fill="none" stroke="#c8ee49" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path id="Vector-6" data-name="Vector" d="M0,0H15.887V15.887H0Z" transform="translate(15.887 15.887) rotate(180)" fill="none" opacity="0"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" width="15.887" height="15.887" viewBox="0 0 15.887 15.887">
<g id="vuesax_linear_copy-success" data-name="vuesax/linear/copy-success" transform="translate(-746 -382)">
<g id="copy-success" transform="translate(746 382)">
<path id="Vector" d="M9.267,6.024V3.244C9.267.927,8.341,0,6.024,0H3.244C.927,0,0,.927,0,3.244v.728H2.052C4.369,3.972,5.3,4.9,5.3,7.215V9.267h.728C8.341,9.267,9.267,8.341,9.267,6.024Z" transform="translate(5.296 1.324)" fill="none" stroke="#a680ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path id="Vector-2" data-name="Vector" d="M9.267,6.024V3.244C9.267.927,8.341,0,6.024,0H3.244C.927,0,0,.927,0,3.244v2.78C0,8.341.927,9.267,3.244,9.267h2.78C8.341,9.267,9.267,8.341,9.267,6.024Z" transform="translate(1.324 5.296)" fill="none" stroke="#a680ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path id="Vector-3" data-name="Vector" d="M0,1.291,1.291,2.582,3.866,0" transform="translate(4.025 8.638)" fill="none" stroke="#a680ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path id="Vector-4" data-name="Vector" d="M0,0H15.887V15.887H0Z" fill="none" opacity="0"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -4,6 +4,10 @@ import "./ProductTags.scss";
import blackCancleIcon from "../../assets/icons/black-cancle-icon.svg";
import blackDeliveryIcon from "../../assets/icons/black-delivery-icon.svg";
import blackRightIcon from "../../assets/icons/black-right-icon.svg";
import blackSettingIcon from "../../assets/icons/black-settings-icon.svg";
import lightGreenGiftIcon from "../../assets/icons/light-green-gift-icon.svg";
import lightPurpleDoubleRightIcon from "../../assets/icons/light-purple-double-right-icon.svg";
import darkblueNewspaperIcon from "../../assets/icons/dark-blue-newspaper-icon.svg";
const ProductTags = ({
tagtitlecolor,
@ -11,6 +15,10 @@ const ProductTags = ({
tagBorderColor,
deliveryIcon,
rightIcon,
darkSettingsIcon,
greenGiftIcon,
purpleCheckboxIcon,
blueNewspaperIcon,
cancleIcon,
}) => {
return (
@ -33,6 +41,22 @@ const ProductTags = ({
{rightIcon && (
<img src={blackRightIcon} alt="" className="ml-1 w-3" />
)}
{darkSettingsIcon && (
<img src={blackSettingIcon} alt="" className="ml-1 w-3" />
)}
{greenGiftIcon && (
<img src={lightGreenGiftIcon} alt="" className="ml-1 w-3" />
)}
{purpleCheckboxIcon && (
<img
src={lightPurpleDoubleRightIcon}
alt=""
className="ml-1 w-3"
/>
)}
{blueNewspaperIcon && (
<img src={darkblueNewspaperIcon} alt="" className="ml-1 w-3" />
)}
ارسال رایگان
{cancleIcon && (
<img src={blackCancleIcon} alt="" className="mr-2 w-2" />
@ -47,37 +71,41 @@ const 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
// ----> text-grayTextColor
// ----> text-lightBlueTextColor
// ----> text-lightOrangeTextColor
// ----> text-lightYellowTextColor
// ----> text-lightGreenTextColor
// ----> text-lightPurpleTextColor
// ----> 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
// ----> bg-productTagBg
// ----> bg-lightOrangeBgColor
// ----> bg-lightYellowBgColor
// ----> bg-lightBlueBgColor
// ----> bg-lightGreenBgColor
// ----> 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
// ----> border-lightBlueBorderColor
// ----> border-grayBorderColor
// ----> border-lightOrangeBorderColor
// ----> border-lightYellowBorderColor
// ----> border-lightGreenBorderColor
// ----> border-lightPurpleBorderColor
// ----> border-darkBlueBorderColor
ProductTags.defaultProps = {
tagtitlecolor: "text-lightPurpleTextColor",
tagBgColor: "bg-lightPurpleBgColor",
tagBorderColor: "border-lightPurpleBorderColor",
tagtitlecolor: "text-grayTextColor",
tagBgColor: "bg-productTagBg",
tagBorderColor: "border-grayBorderColor",
// for icons
deliveryIcon: true,
deliveryIcon: false,
rightIcon: false,
darkSettingsIcon: false,
greenGiftIcon: false,
purpleCheckboxIcon: false,
blueNewspaperIcon: true,
cancleIcon: true,
};

Loading…
Cancel
Save