easy-bold-app / components /Layout.jsx
elphereno's picture
Upload components/Layout.jsx with huggingface_hub
179aedb verified
Raw History Blame Contribute Delete
3.94 kB
import React from 'react';
import { Search, Church } from 'lucide-react';
const Layout = ({
children,
activeTab,
setActiveTab,
navItems,
searchTerm,
setSearchTerm
}) => {
return (
<div className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-50">
{/* Header */}
<header className="bg-white shadow-lg border-b border-gray-100">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="flex justify-between items-center py-5">
<div className="flex items-center space-x-4">
<div className="bg-gradient-to-r from-blue-600 to-indigo-700 p-3 rounded-xl shadow-lg">
<Church className="h-8 w-8 text-white" />
</div>
<div>
<h1 className="text-2xl font-bold bg-gradient-to-r from-blue-600 to-indigo-700 bg-clip-text text-transparent">Gestion Église</h1>
<p className="text-sm text-gray-500">Administration complète</p>
</div>
</div>
<div className="flex items-center space-x-4">
<div className="hidden md:block">
<div className="relative">
<div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<Search className="h-4 w-4 text-gray-400" />
</div>
<input
type="text"
placeholder="Recherche globale..."
className="pl-10 pr-4 py-2 w-64 border border-gray-200 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all"
/>
</div>
</div>
<div className="flex items-center space-x-3">
<div className="text-right hidden sm:block">
<p className="text-sm font-semibold text-gray-900">Administrateur</p>
<p className="text-xs text-gray-500">Connecté</p>
</div>
<div className="w-12 h-12 bg-gradient-to-r from-blue-500 to-indigo-600 rounded-full flex items-center justify-center shadow-md">
<span className="text-white font-bold text-lg">A</span>
</div>
</div>
</div>
</div>
</div>
</header>
{/* Navigation */}
<nav className="bg-white shadow-sm sticky top-0 z-40 border-b border-gray-100">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="flex space-x-1 overflow-x-auto py-3">
{navItems.map((item) => {
const Icon = item.icon;
return (
<button
key={item.id}
onClick={() => setActiveTab(item.id)}
className={`px-4 py-2 rounded-lg font-medium text-sm whitespace-nowrap flex items-center space-x-2 transition-all duration-200 ${
activeTab === item.id
? 'bg-gradient-to-r from-blue-500 to-indigo-600 text-white shadow-md'
: 'text-gray-600 hover:text-gray-900 hover:bg-blue-50'
}`}
>
<Icon className="h-4 w-4" />
<span>{item.label}</span>
{item.count !== null && (
<span className={`text-xs px-2 py-0.5 rounded-full ${
activeTab === item.id
? 'bg-white text-blue-600'
: 'bg-blue-100 text-blue-800'
}`}>
{item.count}
</span>
)}
</button>
);
})}
</div>
</div>
</nav>
{/* Main Content */}
<main className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
{children}
</main>
</div>
);
};
export default Layout;