-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from chingu-x/CGD-33-Navbar
Cgd 33 navbar
- Loading branch information
Showing
16 changed files
with
121 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export { default as StoreProvider } from "./StoreProvider"; | ||
export { default as Avatar } from "./Avatar"; | ||
export { default as Navbar } from "./navbar/Navbar"; | ||
export { default as Button } from "./Button"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { BellIcon } from "@heroicons/react/20/solid"; | ||
|
||
export default function Bell({ | ||
notificationCount, | ||
}: { | ||
notificationCount: number; | ||
}) { | ||
return ( | ||
<div className="indicator"> | ||
<span className="indicator-item badge badge-error px-1 rounded-full text-white"> | ||
{notificationCount} | ||
</span> | ||
<BellIcon className="h-6 w-6 hover:text-base-100 duration-200 self-center cursor-pointer" /> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import Image from "next/image"; | ||
|
||
export default function ChinguMenu() { | ||
return ( | ||
<div className="flex items-center gap-2 cursor-pointer"> | ||
<Image | ||
src="/chingu_logo.png" | ||
width={50} | ||
height={50} | ||
alt="Chingu Logo" | ||
priority={false} | ||
/> | ||
<h2 className=" font-semibold text-lg">Chingu</h2> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { ChevronDownIcon } from "@heroicons/react/24/outline"; | ||
import DropDownLink from "./DropDownLink"; | ||
|
||
export default function DropDown({ name }: { name: string }) { | ||
return ( | ||
<div className="dropdown py-0 mx-2 dropdown-bottom"> | ||
<label | ||
tabIndex={0} | ||
className="btn m-0 p-0 bg-transparent border-none hover:border-none hover:bg-transparent" | ||
> | ||
{name} <ChevronDownIcon className="w-4" /> | ||
</label> | ||
<ul | ||
tabIndex={0} | ||
className="dropdown-content z-[1] menu p-2 shadow bg-base-100 rounded-box right-0" | ||
> | ||
<DropDownLink title="Link 1" /> | ||
<DropDownLink title="404???" href="/hello404" /> | ||
</ul> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import Link from "next/link"; | ||
|
||
interface DropDownLinkProps { | ||
title: string; | ||
href?: string; | ||
} | ||
|
||
export default function DropDownLink({ title, href = "#" }: DropDownLinkProps) { | ||
return ( | ||
<li> | ||
<Link | ||
href={href} | ||
className="text-neutral hover:text-neutral-focus font-semibold duration-200" | ||
> | ||
{title} | ||
</Link> | ||
</li> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Avatar } from "@/components"; | ||
import { Bell, ChinguMenu, DropDown } from "@/components/navbar"; | ||
|
||
const name = "Yorick"; | ||
const notificationCount = 4; | ||
|
||
export default function Navbar() { | ||
return ( | ||
<nav className="navbar bg-primary h-8"> | ||
<div className="flex-1 pl-2"> | ||
<ChinguMenu /> | ||
</div> | ||
<div> | ||
<Bell notificationCount={notificationCount} /> | ||
<div className="px-2 ml-6 flex flex-row items-center"> | ||
<Avatar image="/avatar.png" height={34} width={34} /> | ||
<DropDown name={name} /> | ||
</div> | ||
</div> | ||
</nav> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export { default as Bell } from "./Bell"; | ||
export { default as ChinguMenu } from "./ChinguMenu"; | ||
export { default as DropDown } from "./DropDown"; | ||
export { default as DropDownLink } from "./DropDownLink"; |