- Add teal-brand (#01A1A2) color to Tailwind config - Hero: white bg, teal text, remove gradient circles/noise overlay, font-semibold - Sidebar: stacked logo, lime COMPLIANCE AI, flush-left active items, remove blue dots - ChecksOverview: remove gradient background and decorative blurs - Campaigns: white bg, primary-blue table text, font-semibold headings - Analytics: white bg, borderless shadow cards, sentence case headings - Auditing: white bg, font-semibold heading - Settings: white bg, remove tab container styling, flat cards, sentence case Proof types - Profile: white bg, flat layout, active-blue question button, design system colors - All page titles changed from font-bold to font-semibold Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
94 lines
4.5 KiB
TypeScript
Executable file
94 lines
4.5 KiB
TypeScript
Executable file
|
|
import React from 'react';
|
|
import { BarclaysLogo } from './icons/BarclaysLogo';
|
|
import { DashboardIcon } from './icons/DashboardIcon';
|
|
import { AnalyticsIcon } from './icons/AnalyticsIcon';
|
|
import { SettingsIcon } from './icons/SettingsIcon';
|
|
import { UserIcon } from './icons/UserIcon';
|
|
import { CampaignsIcon } from './icons/CampaignsIcon';
|
|
import { AuditIcon } from './icons/AuditIcon';
|
|
|
|
const navigation = [
|
|
{ name: 'Home', icon: DashboardIcon },
|
|
{ name: 'Campaigns', icon: CampaignsIcon },
|
|
// { name: 'WIP Reviewer', icon: ClipboardIcon }, // Hidden: Moved to Settings > Beta
|
|
// { name: 'CopyGenAI', icon: CopyGenAIIcon }, // Hidden: Moved to Settings > Beta
|
|
{ name: 'Analytics', icon: AnalyticsIcon },
|
|
{ name: 'Auditing', icon: AuditIcon },
|
|
{ name: 'Settings', icon: SettingsIcon },
|
|
];
|
|
|
|
interface SidebarProps {
|
|
activeItem: string;
|
|
onNavigate: (viewName: string) => void;
|
|
userName?: string;
|
|
userEmail?: string;
|
|
}
|
|
|
|
export const Sidebar: React.FC<SidebarProps> = ({ activeItem, onNavigate, userName, userEmail }) => {
|
|
return (
|
|
<aside className="w-72 flex-shrink-0 bg-primary-blue text-slate-200 flex flex-col border-r border-white/10 font-sans">
|
|
{/* Brand Header */}
|
|
<div className="py-6 px-8 border-b border-white/10 flex flex-col items-center text-center">
|
|
<BarclaysLogo className="h-10 w-auto text-cyan-brand mb-2" />
|
|
<span className="text-lg font-bold tracking-tight text-white leading-tight">
|
|
Mod Comms
|
|
</span>
|
|
<span className="text-xs text-lime uppercase tracking-widest font-semibold">
|
|
Compliance AI
|
|
</span>
|
|
<span className="text-xs text-grey-700 tracking-wider mt-0.5">
|
|
powered by <span className="font-bold">OLIVER</span>
|
|
</span>
|
|
</div>
|
|
|
|
{/* Navigation */}
|
|
<nav className="flex-1 pr-4 pl-0 py-8 space-y-2 overflow-y-auto">
|
|
{navigation.map((item) => {
|
|
const Icon = item.icon;
|
|
const isActive = item.name === activeItem;
|
|
const isComingSoon = (item as any).isComingSoon;
|
|
|
|
return (
|
|
<button
|
|
key={item.name}
|
|
onClick={() => !isComingSoon && onNavigate(item.name)}
|
|
className={`group w-full flex items-center pl-8 pr-4 py-3.5 text-left text-sm font-medium transition-all duration-300 ease-in-out ${
|
|
isActive
|
|
? 'bg-white text-primary-blue shadow-lg rounded-r-[10px] rounded-l-none'
|
|
: isComingSoon
|
|
? 'text-slate-600 cursor-not-allowed rounded-[10px]'
|
|
: 'text-slate-300 hover:bg-white/10 hover:text-white rounded-[10px]'
|
|
}`}
|
|
aria-current={isActive ? 'page' : undefined}
|
|
disabled={isComingSoon}
|
|
>
|
|
<Icon className={`h-5 w-5 mr-4 transition-transform duration-300 ${isActive ? 'scale-110' : 'group-hover:scale-110'}`} />
|
|
<span className="flex-1 tracking-wide">{item.name}</span>
|
|
</button>
|
|
);
|
|
})}
|
|
</nav>
|
|
|
|
{/* User Profile Snippet */}
|
|
<div className="p-4 border-t border-white/10 bg-primary-blue/80">
|
|
<button
|
|
onClick={() => onNavigate('Profile')}
|
|
className={`group w-full flex items-center gap-3 p-3 rounded-[10px] text-left transition-all duration-200 ${
|
|
activeItem === 'Profile'
|
|
? 'bg-white/10'
|
|
: 'hover:bg-white/10'
|
|
}`}
|
|
>
|
|
<div className="w-10 h-10 rounded-full bg-active-blue flex items-center justify-center ring-2 ring-white/20 group-hover:ring-active-blue/50 transition-all">
|
|
<UserIcon className="h-5 w-5 text-white" />
|
|
</div>
|
|
<div className="overflow-hidden">
|
|
<p className="font-semibold text-sm text-white truncate">{userName || 'Unknown User'}</p>
|
|
<p className="text-xs text-slate-400 truncate">{userEmail || ''}</p>
|
|
</div>
|
|
</button>
|
|
</div>
|
|
</aside>
|
|
);
|
|
};
|