|
|
@ -1,11 +1,12 @@ |
|
|
|
import React from "react"; |
|
|
|
import React from "react"; |
|
|
|
|
|
|
|
|
|
|
|
import cartIcon from "../../../assets/icons/dark-crimson-cart-icon.svg"; |
|
|
|
import cartIcon from "../../../assets/icons/dark-crimson-cart-icon.svg"; |
|
|
|
|
|
|
|
import whiteCartIcon from "../../../assets/icons/white-cart-icon.svg"; |
|
|
|
import profileIcon from "../../../assets/icons/dark-crimson-profile-icon.svg"; |
|
|
|
import profileIcon from "../../../assets/icons/dark-crimson-profile-icon.svg"; |
|
|
|
import searchIcon from "../../../assets/icons/dark-crimson-search-box.svg"; |
|
|
|
import searchIcon from "../../../assets/icons/dark-crimson-search-box.svg"; |
|
|
|
import lightGraySearchIcon from "../../../assets/icons/light-gray-search-box.svg"; |
|
|
|
import lightGraySearchIcon from "../../../assets/icons/light-gray-search-box.svg"; |
|
|
|
import darkCrimsonHamburgerMenu from "../../../assets/icons/dark-crimson-hamburger-menu.svg"; |
|
|
|
import darkCrimsonHamburgerMenu from "../../../assets/icons/dark-crimson-hamburger-menu.svg"; |
|
|
|
import verticalLineIcon from "../../../assets/icons/dark-crimson-vertical-line.svg"; |
|
|
|
import whiteHamburgerMenu from "../../../assets/icons/white-hamburger-menu-icon.svg"; |
|
|
|
|
|
|
|
|
|
|
|
const HeaderDesign1 = ({ |
|
|
|
const HeaderDesign1 = ({ |
|
|
|
iconHolder, |
|
|
|
iconHolder, |
|
|
@ -27,24 +28,36 @@ const HeaderDesign1 = ({ |
|
|
|
searchBox, |
|
|
|
searchBox, |
|
|
|
topHeader, |
|
|
|
topHeader, |
|
|
|
bottomHeader, |
|
|
|
bottomHeader, |
|
|
|
|
|
|
|
priceHolder, |
|
|
|
|
|
|
|
tomanColor, |
|
|
|
|
|
|
|
headerBgColor, |
|
|
|
|
|
|
|
siteNameTextColor, |
|
|
|
|
|
|
|
productCategoryTextColor, |
|
|
|
|
|
|
|
menuItemsColor, |
|
|
|
|
|
|
|
topHeaderItemsColor, |
|
|
|
|
|
|
|
whiteIconCart, |
|
|
|
|
|
|
|
whiteIconHamburgerMenu, |
|
|
|
|
|
|
|
darkIconHamburgerMenu, |
|
|
|
}) => { |
|
|
|
}) => { |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<header className="container mx-auto py-2 px-8 w-full bg-white rounded shadow-sm mb-20"> |
|
|
|
<header |
|
|
|
|
|
|
|
className={`container mx-auto py-2 px-8 rounded-b-md w-full shadow-sm mb-20 ${headerBgColor}`} |
|
|
|
|
|
|
|
> |
|
|
|
{topHeader && ( |
|
|
|
{topHeader && ( |
|
|
|
<div className="flex justify-between items-center mb-2"> |
|
|
|
<div className="flex justify-between items-center mb-2"> |
|
|
|
<div className=""> |
|
|
|
<div className=""> |
|
|
|
<span className="text-xs font-light ml-4 text-productPrice"> |
|
|
|
<span className={`text-xs font-light ml-4 ${topHeaderItemsColor}`}> |
|
|
|
انتخاب کشور |
|
|
|
انتخاب کشور |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<span className="text-xs font-light text-productPrice"> |
|
|
|
<span className={`text-xs font-light ${topHeaderItemsColor}`}> |
|
|
|
پیگیری سفارش |
|
|
|
پیگیری سفارش |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className=""> |
|
|
|
<div className=""> |
|
|
|
<span className="text-xs font-light text-productPrice ml-2 "> |
|
|
|
<span className={`text-xs font-light ml-2 ${topHeaderItemsColor}`}> |
|
|
|
شکایات{" "} |
|
|
|
شکایات |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<span className="text-xs font-light text-productPrice"> |
|
|
|
<span className={`text-xs font-light ${topHeaderItemsColor}`}> |
|
|
|
ورود و ثبت نام |
|
|
|
ورود و ثبت نام |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -52,11 +65,11 @@ const HeaderDesign1 = ({ |
|
|
|
)} |
|
|
|
)} |
|
|
|
<div className="flex justify-between items-center relative"> |
|
|
|
<div className="flex justify-between items-center relative"> |
|
|
|
<div className="ml-10"> |
|
|
|
<div className="ml-10"> |
|
|
|
<span className="text-sm font-bold text-productPrice ml-4"> |
|
|
|
<span className={`text-sm font-bold ml-4 ${siteNameTextColor}`}> |
|
|
|
Design System |
|
|
|
Design System |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
{category && ( |
|
|
|
{category && ( |
|
|
|
<span className="text-sm font-bold text-productPrice "> |
|
|
|
<span className={`text-sm font-bold ${productCategoryTextColor}`}> |
|
|
|
دسته بندی ها |
|
|
|
دسته بندی ها |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
)} |
|
|
|
)} |
|
|
@ -122,13 +135,14 @@ const HeaderDesign1 = ({ |
|
|
|
)} |
|
|
|
)} |
|
|
|
{iconHolder && ( |
|
|
|
{iconHolder && ( |
|
|
|
<div className="w-1/5 flex justify-end items-center "> |
|
|
|
<div className="w-1/5 flex justify-end items-center "> |
|
|
|
<p className="text-xs text-productPrice ml-2"> |
|
|
|
<p className={`text-xs ml-2 ${priceHolder}`}> |
|
|
|
140,000 |
|
|
|
140,000 |
|
|
|
<span className="text-xs font-light text-productPrice"> |
|
|
|
<span className={`text-xs font-light ${tomanColor}`}>تومان</span> |
|
|
|
تومان |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
</p> |
|
|
|
</p> |
|
|
|
{iconCart && <img src={cartIcon} alt="" className="w-5 h-5 ml-2" />} |
|
|
|
{iconCart && <img src={cartIcon} alt="" className="w-5 h-5 ml-2" />} |
|
|
|
|
|
|
|
{whiteIconCart && ( |
|
|
|
|
|
|
|
<img src={whiteCartIcon} alt="" className="w-5 h-5 ml-2" /> |
|
|
|
|
|
|
|
)} |
|
|
|
{iconSearch && ( |
|
|
|
{iconSearch && ( |
|
|
|
<img src={searchIcon} alt="" className="w-5 h-5 ml-2" /> |
|
|
|
<img src={searchIcon} alt="" className="w-5 h-5 ml-2" /> |
|
|
|
)} |
|
|
|
)} |
|
|
@ -141,31 +155,36 @@ const HeaderDesign1 = ({ |
|
|
|
{bottomHeader && ( |
|
|
|
{bottomHeader && ( |
|
|
|
<div className="flex items-center mt-4 relative w-full "> |
|
|
|
<div className="flex items-center mt-4 relative w-full "> |
|
|
|
<div className="ml-10 flex items-center"> |
|
|
|
<div className="ml-10 flex items-center"> |
|
|
|
|
|
|
|
{darkIconHamburgerMenu && ( |
|
|
|
<img src={darkCrimsonHamburgerMenu} alt="" className="w-5 h-5" /> |
|
|
|
<img src={darkCrimsonHamburgerMenu} alt="" className="w-5 h-5" /> |
|
|
|
<span className="text-xs text-productPrice mr-2"> |
|
|
|
)} |
|
|
|
دسته بندی ها کالاها |
|
|
|
{whiteIconHamburgerMenu && ( |
|
|
|
|
|
|
|
<img src={whiteHamburgerMenu} alt="" className="w-3 h-3" /> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
<span className={`text-xs mr-2 ${productCategoryTextColor}`}> |
|
|
|
|
|
|
|
دسته بندی کالاها |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div |
|
|
|
<div |
|
|
|
className="hidden lg:flex items-center justify-around w-3/5 absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2" |
|
|
|
className="hidden lg:flex items-center justify-around w-3/5 absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2" |
|
|
|
style={{ maxWidth: 700 }} |
|
|
|
style={{ maxWidth: 700 }} |
|
|
|
> |
|
|
|
> |
|
|
|
<a href="#" className="text-productPrice text-xs"> |
|
|
|
<a href="#" className={`text-xs ${menuItemsColor}`}> |
|
|
|
محصولات |
|
|
|
محصولات |
|
|
|
</a> |
|
|
|
</a> |
|
|
|
<a href="#" className="text-productPrice text-xs"> |
|
|
|
<a href="#" className={`text-xs ${menuItemsColor}`}> |
|
|
|
دسته بندی |
|
|
|
دسته بندی |
|
|
|
</a> |
|
|
|
</a> |
|
|
|
<a href="#" className="text-productPrice text-xs"> |
|
|
|
<a href="#" className={`text-xs ${menuItemsColor}`}> |
|
|
|
تماس با ما |
|
|
|
تماس با ما |
|
|
|
</a> |
|
|
|
</a> |
|
|
|
<a href="#" className="text-productPrice text-xs"> |
|
|
|
<a href="#" className={`text-xs ${menuItemsColor}`}> |
|
|
|
درباره ما |
|
|
|
درباره ما |
|
|
|
</a> |
|
|
|
</a> |
|
|
|
<a href="#" className="text-productPrice text-xs"> |
|
|
|
<a href="#" className={`text-xs ${menuItemsColor}`}> |
|
|
|
پیگیری |
|
|
|
پیگیری |
|
|
|
</a> |
|
|
|
</a> |
|
|
|
<a href="#" className="text-productPrice text-xs"> |
|
|
|
<a href="#" className={`text-xs ${menuItemsColor}`}> |
|
|
|
وبلاگ |
|
|
|
وبلاگ |
|
|
|
</a> |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -179,14 +198,39 @@ export default HeaderDesign1; |
|
|
|
|
|
|
|
|
|
|
|
// یک تگ دیو در نظر گرفتم برای 3 تا ایکن سرچ/پروفایل/اضافه کردن به سبد خرید که اینارو انداختم داخل دیو ایکن هولدر
|
|
|
|
// یک تگ دیو در نظر گرفتم برای 3 تا ایکن سرچ/پروفایل/اضافه کردن به سبد خرید که اینارو انداختم داخل دیو ایکن هولدر
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// text colors that is used in this component
|
|
|
|
|
|
|
|
// text-productPrice
|
|
|
|
|
|
|
|
// text-white
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// background colors that is used in this component
|
|
|
|
|
|
|
|
// bg-darkCrimsonBgColor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// border colors that is used in this component
|
|
|
|
|
|
|
|
// border-darkCrimsonBorderColor
|
|
|
|
|
|
|
|
|
|
|
|
HeaderDesign1.defaultProps = { |
|
|
|
HeaderDesign1.defaultProps = { |
|
|
|
|
|
|
|
headerBgColor: "bg-white", |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
siteNameTextColor: "text-productPrice", |
|
|
|
|
|
|
|
productCategoryTextColor: "text-productPrice", |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
menuItemsColor: "text-productPrice", |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
topHeaderItemsColor: "text-productPrice", |
|
|
|
|
|
|
|
|
|
|
|
border: "border", |
|
|
|
border: "border", |
|
|
|
loginBorderColor: "border-darkCrimsonBorderColor", |
|
|
|
|
|
|
|
btnRounded: "rounded-md", |
|
|
|
btnRounded: "rounded-md", |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
loginBorderColor: "border-darkCrimsonBorderColor", |
|
|
|
loginBtnBgColor: "bg-white", |
|
|
|
loginBtnBgColor: "bg-white", |
|
|
|
loginTextColor: "text-productPrice", |
|
|
|
loginTextColor: "text-productPrice", |
|
|
|
|
|
|
|
|
|
|
|
registerBtnBgColor: "bg-darkCrimsonBgColor", |
|
|
|
registerBtnBgColor: "bg-darkCrimsonBgColor", |
|
|
|
registerTextColor: "text-white", |
|
|
|
registerTextColor: "text-white", |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tomanColor: "text-productPrice", |
|
|
|
|
|
|
|
priceHolder: "text-productPrice", |
|
|
|
|
|
|
|
|
|
|
|
btnPY: "py-2", |
|
|
|
btnPY: "py-2", |
|
|
|
btnPX: "px-8", |
|
|
|
btnPX: "px-8", |
|
|
|
|
|
|
|
|
|
|
@ -196,9 +240,16 @@ HeaderDesign1.defaultProps = { |
|
|
|
menuItems: false, |
|
|
|
menuItems: false, |
|
|
|
category: false, |
|
|
|
category: false, |
|
|
|
searchBox: true, |
|
|
|
searchBox: true, |
|
|
|
|
|
|
|
|
|
|
|
// icons
|
|
|
|
// icons
|
|
|
|
loginBtn: false, |
|
|
|
loginBtn: false, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
whiteIconCart: true, |
|
|
|
|
|
|
|
darkCrimsonIconCart: false, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
whiteIconHamburgerMenu: false, |
|
|
|
|
|
|
|
darkIconHamburgerMenu: true, |
|
|
|
|
|
|
|
|
|
|
|
iconHolder: true, |
|
|
|
iconHolder: true, |
|
|
|
iconProfile: false, |
|
|
|
iconProfile: false, |
|
|
|
iconCart: true, |
|
|
|
iconCart: true, |
|
|
|