-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5ea4798
commit e18679d
Showing
6 changed files
with
168 additions
and
3 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
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Sidebar imports | ||
import { | ||
UilEstate, | ||
UilClipboardAlt, | ||
UilUsersAlt, | ||
UilPackage, | ||
UilChart, | ||
UilSignOutAlt, | ||
} from "@iconscout/react-unicons"; | ||
|
||
export const SidebarData=[{ | ||
icon: UilEstate, | ||
heading: "Dashboard", | ||
}, | ||
{ | ||
icon: UilClipboardAlt, | ||
heading: "Orders", | ||
}, | ||
{ | ||
icon: UilUsersAlt, | ||
heading: "Customers", | ||
}, | ||
{ | ||
icon: UilPackage, | ||
heading: 'Products' | ||
}, | ||
{ | ||
icon: UilChart, | ||
heading: 'Analytics' | ||
},]; |
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,62 @@ | ||
.Sidebar{ | ||
display: flex; | ||
flex-direction: column; | ||
position: relative; | ||
padding-top: 4rem; | ||
transform: all 300ms ease; | ||
} | ||
|
||
.logo{ | ||
display: flex; | ||
font-weight: bold; | ||
font-size: 22px; | ||
gap: 1rem; | ||
justify-content: center; | ||
align-items: center; | ||
height: 4%; | ||
} | ||
|
||
.logo img{ | ||
height: 3rem; | ||
width: 3rem; | ||
} | ||
|
||
.logo span span{ | ||
color: var(--pink); | ||
} | ||
|
||
/* menu */ | ||
.menu{ | ||
margin-top: 4rem; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 2rem; | ||
} | ||
|
||
.menuItem{ | ||
display: flex; | ||
align-items: center; | ||
gap: 1rem; | ||
height: 2.5rem; | ||
margin-left: 2rem; | ||
position: relative; | ||
transition: all 300ms ease; | ||
font-size: 14px; | ||
border-radius: 0.7rem; | ||
} | ||
|
||
.menuItem:hover{ | ||
cursor: pointer; | ||
} | ||
|
||
.active{ | ||
background-color: var(--activeItem); | ||
margin-left: 0; | ||
} | ||
|
||
.active::before{ | ||
content: ''; | ||
width: 8px; | ||
height: 100%; | ||
background: var(--pink); | ||
} |
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,39 @@ | ||
import React, { useState } from 'react' | ||
import Logo from '../../imgs/logo.png'; | ||
import './Sidebar.css'; | ||
|
||
import {UilSignOutAlt} from '@iconscout/react-unicons'; | ||
import {SidebarData} from '../../Data/Data.js'; | ||
const Sidebar = () => { | ||
|
||
const [selected,setSelected]=useState(0); | ||
return ( | ||
<div className="Sidebar"> | ||
{/*logo */} | ||
<div className="logo"> | ||
<img src={Logo} alt="" /> | ||
<span>Sh<span>o</span>p</span> | ||
</div> | ||
{/* menu */} | ||
<div className="menu"> | ||
{SidebarData.map((item,index)=>{ | ||
return( | ||
<div className={selected===index?"menuItem active":"menuItem"} | ||
key={index} | ||
onClick={()=>setSelected(index)}> | ||
<item.icon/> | ||
<span>{item.heading}</span> | ||
</div> | ||
) | ||
})} | ||
<div className="menuItem"> | ||
<UilSignOutAlt/> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
|
||
) | ||
} | ||
|
||
export default Sidebar |