diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2022-11-01 10:48:32 +0700 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2022-11-01 10:48:32 +0700 |
| commit | 20381b7dd4fcd05d6945466f1a22492ef60575ca (patch) | |
| tree | 2e937d37594d7c66fe1afc9d27f830f4607c3e6b /src/components/header.js | |
| parent | 260a6ab254a61f76d8975b21d2c8f31c4ca1269f (diff) | |
delete un-use file
Diffstat (limited to 'src/components/header.js')
| -rw-r--r-- | src/components/header.js | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/src/components/header.js b/src/components/header.js deleted file mode 100644 index 3d5d0f84..00000000 --- a/src/components/header.js +++ /dev/null @@ -1,69 +0,0 @@ -import Image from "next/image"; -import Link from "next/link"; -import ShoppingCartIcon from "../icons/shopping-cart.svg"; -import SearchIcon from "../icons/search.svg"; -import MenuIcon from "../icons/menu.svg"; -import ChevronRightIcon from "../icons/chevron-right.svg"; -import { useState } from "react"; - - -export default function Header() { - const [isMenuActive, setIsMenuActive] = useState(false); - - const openMenu = () => setIsMenuActive(true); - const closeMenu = () => setIsMenuActive(false); - - return ( - <> - <div className={isMenuActive ? 'menu-wrapper active' : 'menu-wrapper'}> - <div className="flex gap-x-2 items-center"> - <Link href="/login" className="w-full py-2 btn-light">Masuk</Link> - <Link href="/register" className="w-full py-2 btn-primary">Daftar</Link> - </div> - <div className="flex flex-col gap-y-4 mt-5"> - <Link className="flex w-full font-normal text-gray-800" href="/shop/brands"> - <span>Brand</span> - <div className="ml-auto"> - <ChevronRightIcon className="stroke-gray-700" /> - </div> - </Link> - <Link className="flex w-full font-normal text-gray-800" href="/blog"> - <span>Blog</span> - <div className="ml-auto"> - <ChevronRightIcon className="stroke-gray-700" /> - </div> - </Link> - <button className="flex w-full font-normal text-gray-800" id="open_category_parent_menu"> - <span>Kategori</span> - <div className="ml-auto"> - <ChevronRightIcon className="stroke-gray-700" /> - </div> - </button> - </div> - </div> - <div className={isMenuActive ? 'menu-overlay block opacity-100' : 'menu-overlay hidden opacity-0'} onClick={closeMenu}></div> - - <div className="sticky-header"> - <div className="flex justify-between items-center"> - <Link href="/"> - <Image src="/images/logo.png" alt="Logo Indoteknik" width={120} height={40} /> - </Link> - <div className="flex gap-4"> - <Link href="/shop/cart"> - <ShoppingCartIcon className="w-6" /> - </Link> - <button onClick={openMenu}> - <MenuIcon className="w-6" /> - </button> - </div> - </div> - <form action="" method="GET" className="flex mt-2"> - <input type="text" name="product_name" className="form-input rounded-r-none border-r-0 focus:outline-none" placeholder="Ketikan nama, merek, part number"/> - <button type="submit" aria-label="search" className="btn-light bg-transparent px-2 py-1 rounded-l-none border-l-0"> - <SearchIcon /> - </button> - </form> - </div> - </> - ) -}
\ No newline at end of file |
