refactor(design): drop rounded classes, swap bg-white and gray borders for tokens
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -117,11 +117,11 @@ function NavLink({ item, pathname }: { item: NavItem; pathname: string }) {
|
||||
return (
|
||||
<Link
|
||||
href={item.href}
|
||||
className={`flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-colors ${
|
||||
isActive
|
||||
? 'bg-blue-50 text-blue-700'
|
||||
: 'text-gray-600 hover:bg-gray-100 hover:text-gray-900'
|
||||
}`}
|
||||
className={`flex items-center gap-3 px-3 py-2 text-sm font-medium transition-colors ${
|
||||
isActive
|
||||
? 'bg-blue-50 text-blue-700'
|
||||
: 'text-gray-600 hover:bg-gray-100 hover:text-gray-900'
|
||||
}`}
|
||||
>
|
||||
<span className={isActive ? 'text-blue-600' : 'text-gray-400'}>{item.icon}</span>
|
||||
{item.label}
|
||||
@@ -147,9 +147,9 @@ export function Sidebar({ role, userName, userEmail }: SidebarProps) {
|
||||
return (
|
||||
<>
|
||||
{/* Desktop sidebar */}
|
||||
<aside className="hidden sm:flex fixed left-0 top-0 h-full w-60 bg-white border-r border-gray-200 flex-col z-40">
|
||||
<aside className="hidden sm:flex fixed left-0 top-0 h-full w-60 bg-surface border-r border-divider flex-col z-40">
|
||||
{/* Header */}
|
||||
<div className="flex items-center justify-between px-4 py-4 border-b border-gray-100">
|
||||
<div className="flex items-center justify-between px-4 py-4 border-b border-divider">
|
||||
<span className="text-base font-bold text-gray-900 tracking-tight">IMS</span>
|
||||
<NotificationBell />
|
||||
</div>
|
||||
@@ -162,7 +162,7 @@ export function Sidebar({ role, userName, userEmail }: SidebarProps) {
|
||||
</nav>
|
||||
|
||||
{/* User + logout */}
|
||||
<div className="border-t border-gray-100 px-3 py-3">
|
||||
<div className="border-t border-divider px-3 py-3">
|
||||
<div className="flex items-center gap-2 px-2 py-2 mb-1">
|
||||
<div className="w-8 h-8 rounded-full bg-blue-600 flex items-center justify-center text-white text-xs font-bold flex-shrink-0">
|
||||
{initials(displayName)}
|
||||
@@ -174,11 +174,11 @@ export function Sidebar({ role, userName, userEmail }: SidebarProps) {
|
||||
</div>
|
||||
<Link
|
||||
href="/account"
|
||||
className={`flex items-center gap-2 w-full px-3 py-2 text-sm rounded-lg transition-colors ${
|
||||
pathname === '/account'
|
||||
? 'bg-blue-50 text-blue-700'
|
||||
: 'text-gray-600 hover:bg-gray-100 hover:text-gray-900'
|
||||
}`}
|
||||
className={`flex items-center gap-2 w-full px-3 py-2 text-sm transition-colors ${
|
||||
pathname === '/account'
|
||||
? 'bg-blue-50 text-blue-700'
|
||||
: 'text-gray-600 hover:bg-gray-100 hover:text-gray-900'
|
||||
}`}
|
||||
>
|
||||
<span className={pathname === '/account' ? 'text-blue-600' : 'text-gray-400'}>
|
||||
<IconUser />
|
||||
@@ -187,19 +187,19 @@ export function Sidebar({ role, userName, userEmail }: SidebarProps) {
|
||||
</Link>
|
||||
<button
|
||||
onClick={logout}
|
||||
className="flex items-center gap-2 w-full px-3 py-2 text-sm text-gray-600 hover:bg-gray-100 hover:text-gray-900 rounded-lg transition-colors"
|
||||
className="flex items-center gap-2 w-full px-3 py-2 text-sm text-gray-600 hover:bg-gray-100 hover:text-gray-900 transition-colors"
|
||||
>
|
||||
<IconLogout />
|
||||
Logout
|
||||
</button>
|
||||
<div className="mt-3 pt-3 border-t border-gray-100 px-2 text-center">
|
||||
<div className="mt-3 pt-3 border-t border-divider px-2 text-center">
|
||||
<p className="text-xs text-gray-400">v1.2.2</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
{/* Mobile bottom tab bar */}
|
||||
<nav className="sm:hidden fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200 flex z-40 safe-area-pb">
|
||||
<nav className="sm:hidden fixed bottom-0 left-0 right-0 bg-surface border-t border-divider flex z-40 safe-area-pb">
|
||||
{mobileItems.map(item => {
|
||||
const exactRoots = ['/reporter', '/supervisor', '/management', '/capa-owner', '/admin', '/report', '/account']
|
||||
const isActive = exactRoots.includes(item.href)
|
||||
@@ -210,8 +210,8 @@ export function Sidebar({ role, userName, userEmail }: SidebarProps) {
|
||||
key={item.href}
|
||||
href={item.href}
|
||||
className={`flex-1 flex flex-col items-center gap-1 py-2 text-[10px] font-medium transition-colors ${
|
||||
isActive ? 'text-blue-600' : 'text-gray-400'
|
||||
}`}
|
||||
isActive ? 'text-blue-600' : 'text-gray-400'
|
||||
}`}
|
||||
>
|
||||
{item.icon}
|
||||
<span className="leading-none">{item.label}</span>
|
||||
|
||||
Reference in New Issue
Block a user