From 0ee14890ccc268738b0f40ca1b4fab174ad9daa6 Mon Sep 17 00:00:00 2001 From: Meliora Ho Date: Sat, 23 Mar 2024 04:05:36 +0000 Subject: [PATCH] Added sidebar component --- compass/app/layout.tsx | 6 +--- compass/app/resource/layout.tsx | 24 +++++++++++++ compass/components/resource/Sidebar.tsx | 46 +++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 5 deletions(-) create mode 100644 compass/app/resource/layout.tsx create mode 100644 compass/components/resource/Sidebar.tsx diff --git a/compass/app/layout.tsx b/compass/app/layout.tsx index 2509089..58c13ff 100644 --- a/compass/app/layout.tsx +++ b/compass/app/layout.tsx @@ -1,9 +1,5 @@ import '../styles/globals.css'; -import { Metadata } from 'next' - -export const metadata: Metadata = { - title: 'Login', -} + export default function RootLayout({ // Layouts must accept a children prop. diff --git a/compass/app/resource/layout.tsx b/compass/app/resource/layout.tsx new file mode 100644 index 0000000..c34eb87 --- /dev/null +++ b/compass/app/resource/layout.tsx @@ -0,0 +1,24 @@ +"use client" + +import Sidebar from '@/components/resource/Sidebar'; +import React, { useState } from 'react'; + +export default function RootLayout({ + + children, +}: { + children: React.ReactNode +}) { + const [isSidebarOpen, setIsSidebarOpen] = useState(true); + + return ( +
+
+ +
+
+ {children} +
+
+ ) +} \ No newline at end of file diff --git a/compass/components/resource/Sidebar.tsx b/compass/components/resource/Sidebar.tsx new file mode 100644 index 0000000..0988924 --- /dev/null +++ b/compass/components/resource/Sidebar.tsx @@ -0,0 +1,46 @@ +import React from 'react'; +import { ChevronRightIcon, BookmarkIcon, ClipboardIcon, BookOpenIcon } from '@heroicons/react/24/solid'; + +const Sidebar: React.FC = () => { + return ( +
+
+ +
+ +
+
+ Compass Center + cssgunc@gmail.com +
+ +
+
+
+

Pages

+ +
+
+
+ ); +}; + +interface SidebarItemProps { + icon: React.ReactElement; + text: string; +} + +const SidebarItem: React.FC = ({ icon, text }) => { + return ( + + {icon} + {text} + + ); +}; + +export default Sidebar; \ No newline at end of file