From d8748135868f41ca6eebea0817608fe702d7588c Mon Sep 17 00:00:00 2001 From: Ishaan Dey Date: Tue, 9 Apr 2024 00:50:48 -0400 Subject: [PATCH] start sidebar --- app/code/[id]/page.tsx | 3 +-- components/editor/index.tsx | 11 +++++----- components/editor/sidebar.tsx | 39 +++++++++++++++++++++++++++++++++++ components/navbar/index.tsx | 2 +- components/ui/tab.tsx | 2 +- 5 files changed, 48 insertions(+), 9 deletions(-) create mode 100644 components/editor/sidebar.tsx diff --git a/app/code/[id]/page.tsx b/app/code/[id]/page.tsx index 3d1887a..139febe 100644 --- a/app/code/[id]/page.tsx +++ b/app/code/[id]/page.tsx @@ -1,6 +1,5 @@ import Navbar from "@/components/navbar" import dynamic from "next/dynamic" -import Image from "next/image" const CodeEditor = dynamic(() => import("@/components/editor"), { ssr: false, @@ -8,7 +7,7 @@ const CodeEditor = dynamic(() => import("@/components/editor"), { export default function CodePage() { return ( -
+
diff --git a/components/editor/index.tsx b/components/editor/index.tsx index b308a51..0e4c230 100644 --- a/components/editor/index.tsx +++ b/components/editor/index.tsx @@ -21,6 +21,7 @@ import { X, } from "lucide-react" import Tab from "../ui/tab" +import Sidebar from "./sidebar" export default function CodeEditor() { const editorRef = useRef(null) @@ -65,7 +66,7 @@ export default function CodeEditor() { return ( <> -
+ Preview
-
+
-
+
-
+
-
+
diff --git a/components/editor/sidebar.tsx b/components/editor/sidebar.tsx new file mode 100644 index 0000000..e76d3fc --- /dev/null +++ b/components/editor/sidebar.tsx @@ -0,0 +1,39 @@ +import { + File, + FilePlus, + Folder, + FolderOpen, + FolderPlus, + Search, +} from "lucide-react" + +export default function Sidebar() { + return ( +
+
+
EXPLORER
+
+
+ +
+
+ +
+
+ +
+
+
+
+
+ + index.html +
+
+ + styles +
+
+
+ ) +} diff --git a/components/navbar/index.tsx b/components/navbar/index.tsx index bd8be9c..c9caa1e 100644 --- a/components/navbar/index.tsx +++ b/components/navbar/index.tsx @@ -12,7 +12,7 @@ export default function Navbar() {
My React Project{" "} -
+
diff --git a/components/ui/tab.tsx b/components/ui/tab.tsx index b791d13..48a198e 100644 --- a/components/ui/tab.tsx +++ b/components/ui/tab.tsx @@ -22,7 +22,7 @@ export default function Tab({ {children}