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 ( -
+
- - + + + +
@@ -55,7 +68,37 @@ const Navbar = () => { "block px-4 py-2 text-sm" )} > - MY LIBRARY + {/* Dropdown Menu start My library */} + + console.log("My publications")} + icon={} + > + + console.log("My Favorites")} + icon={} + > + + console.log("My Collections")} + icon={} + > + + console.log("Recent Viewed")} + icon={} + > + + {/* Dropdown Menu End My library */} )} @@ -68,25 +111,31 @@ const Navbar = () => { "block px-4 py-2 text-sm" )} > - ABOUT + {/* Dropdown Menu About - start - */} + + console.log("About Freeland")} + > + + console.log("Contact Us")} + > + + console.log("Help")} + > + + {/* Dropdown Menu About - End - */} )} - {/*
- - {({ active }) => ( - - )} - -
*/}