feat: Ajout de React pour le front, début de refonte du front
This commit is contained in:
parent
73774f84ff
commit
666636e5bf
26
assets/react/app/presentation/components/Layout/Layout.jsx
Normal file
26
assets/react/app/presentation/components/Layout/Layout.jsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import React, { useState } from 'react';
|
||||
import { Header } from '../Header';
|
||||
import { Sidebar } from '../Sidebar';
|
||||
|
||||
export function Layout({ children, onMangaClick, onAddMangaClick }) {
|
||||
const [isSidebarOpen, setIsSidebarOpen] = useState(false);
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-gray-50">
|
||||
<Header
|
||||
onMenuClick={() => setIsSidebarOpen(!isSidebarOpen)}
|
||||
onMangaClick={onMangaClick}
|
||||
onAddMangaClick={onAddMangaClick}
|
||||
/>
|
||||
<Sidebar
|
||||
isOpen={isSidebarOpen}
|
||||
onClose={() => setIsSidebarOpen(false)}
|
||||
onAddMangaClick={onAddMangaClick}
|
||||
/>
|
||||
|
||||
<main className="pt-16 md:ml-60">
|
||||
{children}
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user