Skip to content

Commit

Permalink
📝worked on folder side bar
Browse files Browse the repository at this point in the history
  • Loading branch information
Rashadjaxon committed May 15, 2024
1 parent 66631b1 commit 55773cd
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 3 deletions.
Binary file added src/assets/empty-folder-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions src/components/FolderSideBar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from "react"
import FolderIcon from "../assets/empty-folder-icon.png"

const FolderSideBar = () => {
return (
<div className="ig:flex h-screen">
<div className="w-full">
<div className="flex-row justify-center flex w-full bg-neutral pb-2">
<img className="w-8 p-1" src={FolderIcon} alt="clear folder icon" />
<h1 className="text-2xl ">Public</h1>
</div>
<div className="flex-row justify-center flex w-full pt-2">
<img className="w-8 p-1" src={FolderIcon} alt="clear folder icon" />
<h1 className="text-2xl ">Private</h1>
</div>
</div>
</div>
)
}

export default FolderSideBar
5 changes: 4 additions & 1 deletion src/components/SideBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ import NotesCard from "./NotesCard"
const SideBar = ({ notes }) => {
return (
<>
<div data-testid="sidebar-component" className="h-screen overflow-scroll">
<div
data-testid="sidebar-component"
className="h-screen overflow-scroll bg-neutral"
>
{notes?.map((note) => (
<NotesCard key={note.id} note={note} />
))}
Expand Down
6 changes: 4 additions & 2 deletions src/pages/Main.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import React from "react"
import SideBar from "../components/SideBar"
import Note from "../components/Note"
import { useFetchGet } from "../utilities/useFetchGet"
import FolderSideBar from "../components/FolderSideBar"
import SideBar from "../components/SideBar"

const Main = () => {
const { data } = useFetchGet("notes")
const notes = data
return (
<div className="h-[calc(100vh-100px)] overflow-hidden">
<div className="flex h-full">
<div className="w-64 bg-lightGray">
<div className="flex w-96 flex-row bg-lightGray">
<FolderSideBar />
<SideBar notes={notes} />
</div>
<div className="w-[calc(100vw-16rem)]">
Expand Down

0 comments on commit 55773cd

Please sign in to comment.