From dafbb444be56280d6b7ca9117d9fc4bff84b6884 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9CSalar?= <“salar.sali97@gmail.com”>
Date: Thu, 18 Aug 2022 14:03:08 +0300
Subject: [PATCH] Header with the navbar files - without additional files
---
src/components/Header.tsx | 163 ++++++++++++++++++++++++++++++++++++++
src/components/Navbar.tsx | 107 ++++++++++++++++++-------
2 files changed, 241 insertions(+), 29 deletions(-)
create mode 100644 src/components/Header.tsx
diff --git a/src/components/Header.tsx b/src/components/Header.tsx
new file mode 100644
index 0000000..d9934f5
--- /dev/null
+++ b/src/components/Header.tsx
@@ -0,0 +1,163 @@
+import classNames from "classnames";
+import { useState } from "react";
+/* -------------------------------------------------------------------------- */
+/* Components */
+/* -------------------------------------------------------------------------- */
+import ContextMenuAction from "./ContextMenuAction";
+import ContextMenu from "./ContextMenu";
+import Logofreeland from "./Logofreeland";
+import { Button } from "./Button/Button";
+import Avatar from "./Avatar";
+import Navbar from "./Navbar";
+import Bell from "./Bell";
+import Logo from "./Logo";
+import Link from "./Link";
+
+/* -------------------------------------------------------------------------- */
+/* Icons */
+/* -------------------------------------------------------------------------- */
+import { ReactComponent as SVGFavoriteOutlined } from "assets/svg/favorite-outlined.svg";
+import { ReactComponent as SVGFolder } from "assets/svg/folder.svg";
+import { ReactComponent as SVGFile } from "assets/svg/file.svg";
+import { ReactComponent as SVGEye } from "assets/svg/eye.svg";
+
+const Header = () => {
+ const [authenticated, setAuthenticated] = useState(false);
+ const onClick = () => setAuthenticated(true);
+
+ /* -------------------------------------------------------------------------- */
+ /* Implement Header Component */
+ /* -------------------------------------------------------------------------- */
+ return (
+
+ {/* Logo and Menu */}
+
+ {/* Logo - start - className="w-7 sm:w-10 " /> */}
+
+
+
+
+ {/* Logo - end - */}
+
+ {/* Menu( Create new - My library - About ) Start */}
+
+ {/* Link Create now - start - */}
+
+ Create new
+
+ {/* Link Create now - end - */}
+
+ {/* Dropdown Menu My library - start - */}
+
+ console.log("My publications")}
+ icon={}
+ >
+
+ console.log("My Favorites")}
+ icon={}
+ >
+
+ console.log("My Collections")}
+ icon={}
+ >
+
+ console.log("Recent Viewed")}
+ icon={}
+ >
+
+ {/* Dropdown Menu My library - End - */}
+
+ {/* Dropdown Menu About - start - */}
+
+ console.log("About Freeland")}
+ >
+
+ console.log("Contact Us")}
+ >
+
+ console.log("Help")}
+ >
+
+ {/* Dropdown Menu About - End - */}
+
+ {/* Menu( Create new - My library - About ) End */}
+
+
+ {/* Sign in - Sign up - Notification - Avatar - Burger */}
+
+ {!authenticated
+ ? [
+
,
+
,
+ ]
+ : [
+
,
+
+
,
+ ]}
+ {/* Burger component will be shown for the small screens */}
+
+
+
+ );
+};
+
+export default Header;
diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx
index 3658ba3..81fc892 100644
--- a/src/components/Navbar.tsx
+++ b/src/components/Navbar.tsx
@@ -1,21 +1,34 @@
+import { Menu, Transition } from "@headlessui/react";
import React, { Fragment } from "react";
import classNames from "classnames";
-import { Menu, Transition } from "@headlessui/react";
-import { ChevronDownIcon } from "@heroicons/react/solid";
-import Burger from "./Burger";
-const Navbar = () => {
+/* -------------------------------------------------------------------------- */
+/* Components */
+/* -------------------------------------------------------------------------- */
+import ContextMenuAction from "./ContextMenuAction";
+import ContextMenu from "./ContextMenu";
+import { Button } from "./Button/Button";
+
+/* -------------------------------------------------------------------------- */
+/* Icons */
+/* -------------------------------------------------------------------------- */
+import { ReactComponent as SVGFavoriteOutlined } from "assets/svg/favorite-outlined.svg";
+import { ReactComponent as SVGHamburger } from "assets/svg/hamburger.svg";
+import { ReactComponent as SVGFolder } from "assets/svg/folder.svg";
+import { ReactComponent as SVGFile } from "assets/svg/file.svg";
+import { ReactComponent as SVGEye } from "assets/svg/eye.svg";
+
+type Props = React.ComponentPropsWithoutRef<"div">;
+
+const Navbar = (props: Props) => {
return (
-
+
*/}