Skip to content

Commit

Permalink
feat: add layout
Browse files Browse the repository at this point in the history
  • Loading branch information
tapeds committed Apr 25, 2024
1 parent e2b5773 commit e9410a9
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/layouts/Footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function Footer() {
return <footer></footer>; //! Add your own footer here
}
19 changes: 19 additions & 0 deletions src/layouts/Layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import * as React from 'react';

import Footer from '@/layouts/Footer';
import Navbar from '@/layouts/Navbar';
import { LayoutProps } from '@/types/layout';

export default function Layout({
children,
withFooter,
withNavbar,
}: LayoutProps) {
return (
<>
{withNavbar && <Navbar />}
{children}
{withFooter && <Footer />}
</>
);
}
3 changes: 3 additions & 0 deletions src/layouts/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function Navbar() {
return <div></div>; //! Add your own navbar here
}
7 changes: 7 additions & 0 deletions src/types/layout.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import * as React from 'react';

export type LayoutProps = {
children: React.ReactNode;
withNavbar: boolean;
withFooter: boolean;
};
1 change: 1 addition & 0 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const config: Config = {
'./src/pages/**/*.{js,ts,jsx,tsx,mdx}',
'./src/components/**/*.{js,ts,jsx,tsx,mdx}',
'./src/app/**/*.{js,ts,jsx,tsx,mdx}',
'./src/layouts/**/*.{js,ts,jsx,tsx,mdx}',
],
theme: {
extend: {
Expand Down

0 comments on commit e9410a9

Please sign in to comment.