File size: 1,565 Bytes
e6f1924 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | 'use client';
import { LayoutDashboard, Menu } from 'lucide-react';
import { useState } from 'react';
import { Button } from '@/components/ui/button';
export function Sidebar() {
const [isOpen, setIsOpen] = useState(true);
return (
<div
className={`${
isOpen ? 'w-64' : 'w-20'
} bg-white border-r border-gray-200 transition-all duration-300 flex flex-col`}
>
<div className="p-4 border-b border-gray-200 flex items-center justify-between">
{isOpen && (
<div className="flex items-center gap-3">
<div className="w-10 h-10 bg-gradient-to-br from-blue-400 to-cyan-300 rounded-lg flex items-center justify-center text-white font-bold">
B
</div>
<div>
<div className="font-bold text-sm text-gray-900">BUKIT</div>
<div className="text-xs text-gray-500">Recruitment</div>
</div>
</div>
)}
<Button
variant="ghost"
size="sm"
onClick={() => setIsOpen(!isOpen)}
className="h-8 w-8 p-0"
>
<Menu className="w-4 h-4" />
</Button>
</div>
<nav className="flex-1 p-4 space-y-2">
<div className="flex items-center gap-3 px-3 py-2 rounded-lg bg-blue-50 text-blue-600">
<LayoutDashboard className="w-5 h-5 flex-shrink-0" />
{isOpen && <span className="text-sm font-medium">Dashboard</span>}
</div>
</nav>
</div>
);
}
|