2025-12-11 10:50:09 +00:00
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
import { Search, LayoutGrid, List } from 'lucide-react';
|
2026-01-28 10:44:49 +00:00
|
|
|
import { ThemeToggle } from '@/components/theme-toggle';
|
2025-12-11 10:50:09 +00:00
|
|
|
|
|
|
|
|
interface DashboardHeaderProps {
|
|
|
|
|
searchTerm: string;
|
|
|
|
|
onSearchChange: (value: string) => void;
|
|
|
|
|
viewMode: 'grid' | 'list';
|
|
|
|
|
onViewModeChange: (mode: 'grid' | 'list') => void;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default function DashboardHeader({
|
|
|
|
|
searchTerm,
|
|
|
|
|
onSearchChange,
|
|
|
|
|
viewMode,
|
|
|
|
|
onViewModeChange
|
|
|
|
|
}: DashboardHeaderProps) {
|
|
|
|
|
return (
|
|
|
|
|
<header className="bg-white border-b border-gray-200">
|
|
|
|
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4">
|
|
|
|
|
<div className="flex items-center justify-between">
|
|
|
|
|
<div>
|
|
|
|
|
<h1 className="text-2xl font-semibold text-gray-900">Dashboard de Proyectos</h1>
|
|
|
|
|
<p className="text-sm text-gray-500 mt-1">Gestiona y visualiza todos tus proyectos</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="flex items-center gap-3">
|
2026-01-28 10:44:49 +00:00
|
|
|
<ThemeToggle />
|
2025-12-11 10:50:09 +00:00
|
|
|
<div className="relative">
|
|
|
|
|
<Search className="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4" />
|
|
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
placeholder="Buscar proyectos..."
|
|
|
|
|
value={searchTerm}
|
|
|
|
|
onChange={(e) => onSearchChange(e.target.value)}
|
|
|
|
|
className="pl-10 pr-4 py-2 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent w-64 text-sm"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="flex gap-1 border border-gray-200 rounded-lg p-1">
|
|
|
|
|
<button
|
|
|
|
|
onClick={() => onViewModeChange('grid')}
|
|
|
|
|
className={`p-2 rounded ${viewMode === 'grid' ? 'bg-gray-100' : 'hover:bg-gray-50'}`}
|
|
|
|
|
>
|
|
|
|
|
<LayoutGrid className="w-4 h-4 text-gray-600" />
|
|
|
|
|
</button>
|
|
|
|
|
<button
|
|
|
|
|
onClick={() => onViewModeChange('list')}
|
|
|
|
|
className={`p-2 rounded ${viewMode === 'list' ? 'bg-gray-100' : 'hover:bg-gray-50'}`}
|
|
|
|
|
>
|
|
|
|
|
<List className="w-4 h-4 text-gray-600" />
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</header>
|
|
|
|
|
);
|
|
|
|
|
}
|