From ba1c22f37bcec456a3717ba72794bccdd2d144db Mon Sep 17 00:00:00 2001 From: "[dyad]" Date: Thu, 11 Sep 2025 11:18:07 +0200 Subject: [PATCH] [dyad] Updated sidebar colors to match primary theme - wrote 2 file(s) --- src/components/Header.tsx | 6 +-- src/components/SidebarNav.tsx | 81 +++++++++++++++++++---------------- 2 files changed, 48 insertions(+), 39 deletions(-) diff --git a/src/components/Header.tsx b/src/components/Header.tsx index e16180f..997f873 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -23,9 +23,9 @@ export const Header = () => { -
-
-

Navigation

+
{/* Changed bg-gray-100 to bg-primary and added text-primary-foreground */} +
{/* Changed border color for contrast */} +

Navigation

diff --git a/src/components/SidebarNav.tsx b/src/components/SidebarNav.tsx index 843ff57..91217b0 100644 --- a/src/components/SidebarNav.tsx +++ b/src/components/SidebarNav.tsx @@ -1,44 +1,53 @@ -import { NavLink } from 'react-router-dom'; -import { LayoutDashboard, Package, ShoppingCart, Users, Settings, FileText } from 'lucide-react'; // Import FileText icon +import { Link, useLocation } from 'react-router-dom'; +import { cn } from '@/lib/utils'; -interface SidebarNavProps { +interface SidebarNavProps extends React.HTMLAttributes { onLinkClick?: () => void; } -export const SidebarNav = ({ onLinkClick }: SidebarNavProps) => { - const navLinkClasses = ({ isActive }: { isActive: boolean }) => - `flex items-center px-4 py-2 rounded-lg transition-colors duration-200 ${ - isActive - ? 'bg-primary-dark text-white' - : 'text-gray-700 hover:bg-gray-200' - }`; +export function SidebarNav({ className, onLinkClick, ...props }: SidebarNavProps) { + const { pathname } = useLocation(); + + const navItems = [ + { + title: 'Dashboard', + href: '/', + }, + { + title: 'Products', + href: '/products', + }, + { + title: 'Orders', + href: '/orders', + }, + { + title: 'Customers', + href: '/customers', + }, + { + title: 'Settings', + href: '/settings', + }, + ]; return ( -