feat: complete admin panel major functionalities including responsive layout, recharts, custom modals, inline editing, and loading states
This commit is contained in:
1 parent
ee041d4e52
commit
a7ebb8d792
33 files changed
+1311
-173
No files matched your search
@@ -10,11 +10,27 @@ const menuItems = [
|
||||
{ icon: Settings, label: 'تنظیمات', path: '/settings' },
|
||||
];
|
||||
|
||||
export default function Sidebar() {
|
||||
interface SidebarProps {
|
||||
isOpen: boolean;
|
||||
setIsOpen: (val: boolean) => void;
|
||||
}
|
||||
|
||||
export default function Sidebar({ isOpen, setIsOpen }: SidebarProps) {
|
||||
const location = useLocation();
|
||||
|
||||
return (
|
||||
<aside className="w-64 bg-white border-l border-gray-200 h-screen sticky top-0 flex flex-col font-vazir shadow-sm">
|
||||
<>
|
||||
{/* Mobile Backdrop */}
|
||||
{isOpen && (
|
||||
<div
|
||||
className="fixed inset-0 bg-black/50 z-40 lg:hidden backdrop-blur-sm"
|
||||
onClick={() => setIsOpen(false)}
|
||||
/>
|
||||
)}
|
||||
|
||||
<aside className={`w-64 bg-white border-l border-gray-200 h-screen fixed lg:sticky top-0 flex flex-col font-vazir shadow-sm z-50 transform transition-transform duration-300 ease-in-out ${
|
||||
isOpen ? 'translate-x-0' : 'translate-x-full lg:translate-x-0'
|
||||
}`}>
|
||||
<div className="h-16 flex items-center justify-center border-b border-gray-200">
|
||||
<h1 className="text-xl font-black text-purple-600">کانینا | ادمینپنل</h1>
|
||||
</div>
|
||||
@@ -48,5 +64,6 @@ export default function Sidebar() {
|
||||
</button>
|
||||
</div>
|
||||
</aside>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user