From deb1bb57ae0d5c0766632d7255de4e478cbd4bb0 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Fri, 26 Mar 2021 20:56:54 +0100 Subject: navbar component + layout variables --- components/navbar.tsx | 27 +++++++++++++++++++++++++++ components/navbarItem.tsx | 14 -------------- 2 files changed, 27 insertions(+), 14 deletions(-) create mode 100644 components/navbar.tsx delete mode 100644 components/navbarItem.tsx (limited to 'components') diff --git a/components/navbar.tsx b/components/navbar.tsx new file mode 100644 index 0000000..bdadfbc --- /dev/null +++ b/components/navbar.tsx @@ -0,0 +1,27 @@ +import { ReactNode } from 'react'; + +import HomeRoundedIcon from '@material-ui/icons/HomeRounded'; +import SearchRoundedIcon from '@material-ui/icons/SearchRounded'; + +function NavbarItem(props: { + icon?: ReactNode; + title: string; + href: string; + active: boolean; +}) { + return +
+ {props.icon} + {props.title} +
+
+} + +export default function Navbar(props: { + page?: string; +}) { + return
+ } title="Home" href="/"/> + } title="Search for posts" href="/search"/> +
+} diff --git a/components/navbarItem.tsx b/components/navbarItem.tsx deleted file mode 100644 index b724444..0000000 --- a/components/navbarItem.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { ReactNode } from 'react'; - -export default function NavbarItem(props: { - icon?: ReactNode; - title: string; - href: string; -}) { - return -
- {props.icon} - {props.title} -
-
-} -- cgit v1.2.3