Skip to content

Commit

Permalink
feat(layout): add main layout
Browse files Browse the repository at this point in the history
  • Loading branch information
ismail-benlaredj committed Oct 13, 2023
1 parent bf322cf commit c38914d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
5 changes: 5 additions & 0 deletions src/components/footer/Footer.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
function Footer() {
return <div className='h-48 w-full'>Footer</div>;
}

export default Footer;
5 changes: 5 additions & 0 deletions src/components/navbar/Navbar.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
function Navbar() {
return <div className='h-10 w-full'>Navbar</div>;
}

export default Navbar;
21 changes: 9 additions & 12 deletions src/layout/Layout.jsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import * as React from "react";
import Footer from "@/components/footer/Footer";
import Navbar from "@/components/navbar/Navbar";

export default function Layout({ children }) {
// Put Header or Footer around the children element
// Example
// return (
// <>
// <Navbar />
// {children}
// <Footer />
// </>
// );

return <>{children}</>;
return (
<div className='container mx-auto '>
<Navbar />
{children}
<Footer />
</div>
);
}

0 comments on commit c38914d

Please sign in to comment.