hailsbop commited on
Commit
1020173
·
verified ·
1 Parent(s): 60086b5

Upload components/Sidebar.js with huggingface_hub

Browse files
Files changed (1) hide show
  1. components/Sidebar.js +81 -0
components/Sidebar.js ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { Inbox, Star, Clock, Send, File, Archive, Trash2, Tag } from 'lucide-react';
2
+
3
+ export default function Sidebar({ activeFilter, setActiveFilter }) {
4
+ const menuItems = [
5
+ { id: 'All', icon: Inbox, label: 'Inbox', count: 12 },
6
+ { id: 'Starred', icon: Star, label: 'Starred', count: 3 },
7
+ { id: 'Snoozed', icon: Clock, label: 'Snoozed', count: 0 },
8
+ { id: 'Sent', icon: Send, label: 'Sent', count: 150 },
9
+ { id: 'Drafts', icon: File, label: 'Drafts', count: 2 },
10
+ ];
11
+
12
+ const labels = [
13
+ { id: 'Work', icon: Tag, color: 'bg-blue-500' },
14
+ { id: 'Finance', icon: Tag, color: 'bg-green-500' },
15
+ { id: 'Social', icon: Tag, color: 'bg-purple-500' },
16
+ { id: 'Promotions', icon: Tag, color: 'bg-yellow-500' },
17
+ ];
18
+
19
+ return (
20
+ <aside className="w-64 bg-slate-50 border-r border-slate-200 flex flex-col shrink-0">
21
+ <div className="p-4">
22
+ <button className="flex items-center gap-3 px-6 py-4 bg-white shadow-md hover:shadow-lg transition-shadow rounded-2xl text-slate-700 font-medium border border-slate-100">
23
+ <Plus size={20} className="text-gmail-blue" />
24
+ Compose
25
+ </button>
26
+ </div>
27
+
28
+ <nav className="flex-1 px-3 space-y-1 overflow-y-auto">
29
+ <div className="mb-4">
30
+ <p className="px-3 text-xs font-semibold text-slate-400 uppercase tracking-wider mb-2">Mailbox</p>
31
+ {menuItems.map((item) => (
32
+ <button
33
+ key={item.id}
34
+ onClick={() => setActiveFilter(item.id)}
35
+ className={`w-full flex items-center justify-between px-3 py-2 rounded-r-full transition-colors text-sm ${
36
+ activeFilter === item.id
37
+ ? 'bg-blue-100 text-blue-700 font-semibold'
38
+ : 'text-slate-600 hover:bg-slate-200'
39
+ }`}
40
+ >
41
+ <div className="flex items-center gap-3">
42
+ <item.icon size={18} />
43
+ <span>{item.label}</span>
44
+ </div>
45
+ {item.count > 0 && <span className="text-xs font-medium">{item.count}</span>}
46
+ </button>
47
+ ))}
48
+ </div>
49
+
50
+ <div>
51
+ <p className="px-3 text-xs font-semibold text-slate-400 uppercase tracking-wider mb-2">Labels</p>
52
+ {labels.map((label) => (
53
+ <button
54
+ key={label.id}
55
+ onClick={() => setActiveFilter(label.id)}
56
+ className={`w-full flex items-center gap-3 px-3 py-2 rounded-r-full transition-colors text-sm ${
57
+ activeFilter === label.id
58
+ ? 'bg-blue-100 text-blue-700 font-semibold'
59
+ : 'text-slate-600 hover:bg-slate-200'
60
+ }`}
61
+ >
62
+ <label.icon size={18} className={label.color.replace('bg-', 'text-')} />
63
+ <span>{label.id}</span>
64
+ </button>
65
+ ))}
66
+ </div>
67
+ </nav>
68
+
69
+ <div className="p-4 border-t border-slate-200">
70
+ <a
71
+ href="https://huggingface.co/spaces/akhaliq/anycoder"
72
+ target="_blank"
73
+ rel="noopener noreferrer"
74
+ className="block text-center text-xs text-slate-400 hover:text-gmail-blue transition-colors py-2"
75
+ >
76
+ Built with anycoder
77
+ </a>
78
+ </div>
79
+ </aside>
80
+ );
81
+ }