-
Notifications
You must be signed in to change notification settings - Fork 14
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
e57265d
commit 4ffe185
Showing
19 changed files
with
173 additions
and
18 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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,43 @@ | ||
import { Link, useLocation } from "react-router-dom"; | ||
|
||
import { ReactComponent as PermissionsIcon } from "../../../assets/roles-and-permissions.svg"; | ||
import { ReactComponent as UserManagementIcon } from "../../../assets/user-managment.svg"; | ||
|
||
import "./sidebar.scss"; | ||
|
||
const sidebarItems = [ | ||
{ | ||
id: "user-management", | ||
title: "User Management", | ||
href: "/", | ||
icon: <UserManagementIcon />, | ||
}, | ||
{ | ||
id: "roles-and-permissions", | ||
title: "Roles and Permissions", | ||
href: "/roles", | ||
icon: <PermissionsIcon />, | ||
}, | ||
]; | ||
|
||
export default function SideBar() { | ||
const location = useLocation(); | ||
|
||
return ( | ||
<aside className="sidebar"> | ||
<ul> | ||
{sidebarItems.map((item) => { | ||
return ( | ||
<li key={item.id}> | ||
<Link | ||
className={`${location.pathname === item.href ? "active" : ""}`} | ||
to={item.href}> | ||
{item.icon} <span>{item.title}</span> | ||
</Link> | ||
</li> | ||
); | ||
})} | ||
</ul> | ||
</aside> | ||
); | ||
} |
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,54 @@ | ||
.sidebar { | ||
position: fixed; | ||
height: 100vh; | ||
width: var(--sidebar-width); | ||
margin-top: 64px; | ||
border-right: 1px solid var(--light-borders-border-base, #e5e7eb); | ||
background-color: var(--color-window-bg); | ||
z-index: 10; | ||
|
||
ul { | ||
list-style-type: none; | ||
} | ||
|
||
ul > li { | ||
margin: 14px 16px; | ||
|
||
& .active { | ||
border-radius: 6px; | ||
border: 1px solid rgba(255, 153, 51, 0.15); | ||
background: rgba(255, 153, 51, 0.1); | ||
|
||
color: #f93; | ||
font-weight: 500; | ||
|
||
& > svg { | ||
stroke: var(--color-primary); | ||
} | ||
} | ||
} | ||
|
||
ul > li > a { | ||
display: block; | ||
padding: 6px 8px; | ||
border-radius: 6px; | ||
|
||
color: var(--light-foregrounds-fg-subtle, #4b5563); | ||
font-size: 13px; | ||
font-style: normal; | ||
font-weight: 400; | ||
line-height: 20px; | ||
|
||
border: 1px solid transparent; | ||
|
||
text-decoration: none; | ||
|
||
display: flex; | ||
justify-content: flex-start; | ||
gap: 12px; | ||
|
||
&:hover:not(.active) { | ||
background: #eee; | ||
} | ||
} | ||
} |
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,22 @@ | ||
import { Footer } from "../components/footer/footer"; | ||
import SideBar from "../components/sidebar"; | ||
|
||
import "./mainLayout.scss"; | ||
|
||
type MainLayoutProps = { | ||
children: React.ReactNode; | ||
}; | ||
|
||
export default function MainLayout({ children }: MainLayoutProps) { | ||
return ( | ||
<main className="main-layout-container"> | ||
<SideBar /> | ||
<section className="main-content">{children}</section> | ||
<Footer | ||
colorMode="dark" | ||
horizontalAlignment="center" | ||
verticalAlignment="center" | ||
/> | ||
</main> | ||
); | ||
} |
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,8 @@ | ||
.main-layout-container { | ||
display: block; | ||
|
||
.main-content { | ||
margin-left: var(--sidebar-width); | ||
min-height: 100vh; | ||
} | ||
} |
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