83 lines
3.6 KiB
TypeScript
83 lines
3.6 KiB
TypeScript
import logo from "@/assets/images/logo.png";
|
||
import { Call, Profile, ShoppingCart, Truck, TruckFast } from "iconsax-reactjs";
|
||
import Image from "next/image";
|
||
import Input from "../components/Input";
|
||
import Seprator from "../components/Seprator";
|
||
import HeaderMenu from "./components/HeaderMenu";
|
||
|
||
const Header = () => {
|
||
return (
|
||
<div>
|
||
<div className="min-h-12 bg-secondary flex items-center justify-between gap-3 px-4 sm:px-8 lg:px-[120px] py-2">
|
||
<div className="flex gap-2 items-center min-w-0">
|
||
<span className="text-primary flex items-center gap-2 min-w-0">
|
||
<Truck size={20} color="currentColor" className="shrink-0 sm:size-6" />
|
||
<div className="text-[#3A4147] text-xs sm:text-sm font-bold truncate">ارسال رایگان برای خرید بالای ۱۰۰ میلیون تومان</div>
|
||
</span>
|
||
</div>
|
||
|
||
<div className="hidden md:flex text-sm font-bold gap-2 items-center shrink-0">
|
||
<span className="text-primary">20%</span>
|
||
<span className="hidden lg:inline">تخفیف برای اولین سفارش خود دریافت کنید |</span>
|
||
<span>
|
||
کد تخفیف : <span className="text-primary">FIRSTORDER</span>
|
||
</span>
|
||
</div>
|
||
|
||
<div className="flex gap-2 items-center shrink-0">
|
||
<Profile className="text-primary" size={20} color="currentColor" />
|
||
<div className="hidden sm:block text-sm">سلام حمید</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div className="bg-white flex flex-col gap-4 lg:flex-row lg:gap-16 lg:items-center lg:h-[120px] border border-secondary px-4 sm:px-8 lg:px-[120px] py-4 lg:py-0">
|
||
<div className="flex items-center justify-between gap-4 lg:contents">
|
||
<Image src={logo} alt="logo" width={116} height={72} className="h-12 w-auto sm:h-[72px] shrink-0" />
|
||
|
||
<div className="flex gap-4 items-center lg:hidden">
|
||
<button type="button" aria-label="پیگیری سفارش" className="text-[#6C7680]">
|
||
<TruckFast variant="Bold" color="currentColor" size={22} />
|
||
</button>
|
||
<button type="button" aria-label="تماس" className="text-[#6C7680]">
|
||
<Call variant="Bold" color="currentColor" size={22} />
|
||
</button>
|
||
<div className="relative">
|
||
<ShoppingCart variant="Bold" color="black" size={22} />
|
||
<div className="absolute -top-1.5 -right-1.5 bg-primary text-white text-xs font-medium rounded-full size-4 flex items-center justify-center">0</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div className="flex-1 w-full">
|
||
<Input variant="search" placeholder="جستجوی محصول" />
|
||
</div>
|
||
|
||
<div className="hidden lg:flex gap-8 items-center shrink-0">
|
||
<div className="flex gap-2 items-center">
|
||
<TruckFast variant="Bold" color="black" />
|
||
<div className="text-[#6C7680] text-sm">پیگیری سفارش</div>
|
||
</div>
|
||
|
||
<Seprator className="h-5 w-px" />
|
||
|
||
<div className="flex gap-2 items-center">
|
||
<Call variant="Bold" color="black" />
|
||
<div className="text-[#6C7680] text-sm whitespace-nowrap">(30 خط) 02134782000</div>
|
||
</div>
|
||
|
||
<Seprator className="h-5 w-px" />
|
||
|
||
<div className="relative">
|
||
<ShoppingCart variant="Bold" color="black" />
|
||
<div className="absolute -top-1.5 -right-1.5 bg-primary text-white text-xs font-medium rounded-full size-4 flex items-center justify-center">0</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<HeaderMenu />
|
||
</div>
|
||
);
|
||
};
|
||
|
||
export default Header;
|