Skip to content

Commit aa177ed

Browse files
committed
style(sidebar): update sidebar colors
1 parent 617cdb2 commit aa177ed

3 files changed

Lines changed: 19 additions & 21 deletions

File tree

apps/web/src/components/dashboard/Sidebar.tsx

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import React, { useState } from "react";
44
import Link from "next/link";
55
import SidebarItem from "../sidebar/SidebarItem";
6-
import { usePathname, useRouter } from "next/navigation";
6+
import { useRouter } from "next/navigation";
77
import { IconWrapper } from "../ui/IconWrapper";
88
import {
99
XMarkIcon,
@@ -41,15 +41,9 @@ const SIDEBAR_ROUTES = [
4141
},
4242
];
4343

44-
const getSidebarLinkClassName = (currentPath: string, routePath: string) => {
45-
const isActive = currentPath === routePath;
46-
return `${isActive ? "text-ox-purple" : "text-ox-white"}`;
47-
};
48-
4944
export default function Sidebar() {
5045
const { showSidebar, setShowSidebar, isCollapsed, toggleCollapsed } =
5146
useShowSidebar();
52-
const pathname = usePathname();
5347
const router = useRouter();
5448
const { isPaidUser } = useSubscription();
5549

@@ -74,7 +68,7 @@ export default function Sidebar() {
7468
}`}
7569
>
7670
{/* Mobile header */}
77-
<div className="flex justify-between px-4 py-4 border-b border-ox-header xl:hidden bg-ox-sidebar">
71+
<div className="flex justify-between items-center h-16 px-4 border-b border-ox-header xl:hidden bg-ox-sideba">
7872
<div className="flex items-center">
7973
<Link
8074
href="/"
@@ -110,11 +104,10 @@ export default function Sidebar() {
110104
</IconWrapper>
111105
</div>
112106

113-
<div className="sidebar-body flex-grow flex-col overflow-y-auto px-3 py-4 space-y-1">
107+
<div className="sidebar-body flex-grow flex-col overflow-y-auto px-3 py-4">
114108
{SIDEBAR_ROUTES.map((route) => {
115-
const activeClass = getSidebarLinkClassName(pathname, route.path);
116109
return (
117-
<Link href={route.path} className={activeClass} key={route.path}>
110+
<Link href={route.path} key={route.path}>
118111
<SidebarItem
119112
itemName={route.label}
120113
icon={route.icon}
@@ -131,14 +124,14 @@ export default function Sidebar() {
131124
/>
132125
{!isCollapsed && !isPaidUser ? (
133126
<div
134-
className="w-full h-[44px] flex items-center rounded-md cursor-pointer transition-colors px-2 gap-3 pl-3 hover:bg-[#121214]"
127+
className="w-full h-[44px] flex items-center rounded-md cursor-pointer transition-colors px-2 gap-3 pl-3 hover:bg-[#292929] group"
135128
onClick={proClickHandler}
136129
>
137-
<span className="shrink-0 text-[#eaeaea]">
130+
<span className="shrink-0 text-[#eaeaea] group-hover:text-white transition-colors">
138131
<StarIcon className="size-5" />
139132
</span>
140133
<div className="flex items-center gap-1">
141-
<h1 className="text-xs font-medium text-[#c8c8c8] group-hover:text-ox-purple">
134+
<h1 className="text-xs font-medium text-[#c8c8c8] group-hover:text-white transition-colors">
142135
Opensox Pro
143136
</h1>
144137
<OpensoxProBadge className="px-1.5 py-0.5 scale-75" />
@@ -189,7 +182,7 @@ function ProfileMenu({ isCollapsed }: { isCollapsed: boolean }) {
189182
return (
190183
<div className="px-3 py-4 border-t border-ox-header bg-ox-sidebar relative profile-menu-container">
191184
<div
192-
className={`group flex items-center rounded-md bg-ox-content border border-ox-header p-2 transition-all duration-300 ease-out cursor-pointer ${
185+
className={`group flex items-center rounded-md bg-ox-profile-card border border-ox-header p-2 transition-all duration-300 ease-out cursor-pointer ${
193186
isCollapsed ? "justify-center" : "gap-3"
194187
}`}
195188
onClick={() => setOpen((s) => !s)}
@@ -211,7 +204,7 @@ function ProfileMenu({ isCollapsed }: { isCollapsed: boolean }) {
211204
</div>
212205
{/* Profile Card Dropdown */}
213206
{!isCollapsed && open && (
214-
<div className="absolute bottom-full left-3 right-3 mb-2 bg-ox-content border border-ox-header rounded-lg shadow-xl overflow-hidden z-50">
207+
<div className="absolute bottom-full left-3 right-3 mb-2 bg-ox-profile-card border border-ox-header rounded-lg shadow-xl overflow-hidden z-50">
215208
{/* User Info Section */}
216209
<div className="p-3 border-b border-ox-header">
217210
<div className="flex items-center gap-3">

apps/web/src/components/sidebar/SidebarItem.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@ export default function SidebarItem({ itemName, onclick, icon, collapsed = false
1515
<div
1616
className={`w-full h-[44px] flex items-center rounded-md cursor-pointer transition-colors px-2 ${
1717
collapsed ? "justify-center" : "gap-3 pl-3"
18-
} hover:bg-[#121214]`}
18+
} hover:bg-[#292929] group`}
1919
onClick={onclick}
2020
>
21-
{icon && <span className="shrink-0 text-[#eaeaea]">{icon}</span>}
21+
{icon && (
22+
<span className="shrink-0 text-[#eaeaea] group-hover:text-white transition-colors">
23+
{icon}
24+
</span>
25+
)}
2226
{!collapsed && (
2327
<div className="flex items-center gap-1.5">
24-
<h1 className="text-xs font-medium text-[#c8c8c8] group-hover:text-ox-purple">
28+
<h1 className="text-xs font-medium text-[#c8c8c8] group-hover:text-white transition-colors">
2529
{itemName}
2630
</h1>
2731
{badge}

apps/web/tailwind.config.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ const config: Config = {
5757
"ox-white": "text-slate-400",
5858
"ox-black-1": "#0E0E10",
5959
"ox-black-2": "#15161A",
60-
"ox-sidebar": "#262626",
61-
"ox-content": "#1E1E1E",
60+
"ox-sidebar": "#141414",
61+
"ox-profile-card": "#1E1E1E",
62+
"ox-content": "#1A1A1A",
6263
"ox-header": "#363636",
6364
},
6465
borderRadius: {

0 commit comments

Comments
 (0)