new-personal-site/layouts/main/index.tsx
2024-12-09 16:36:17 +01:00

31 lines
1.1 KiB
TypeScript

import Main from "@/components/lib/layout/Main";
import React, { PropsWithChildren } from "react";
import Aside from "./Aside";
import Header from "./Header";
import Footer from "./Footer";
import { twMerge } from "tailwind-merge";
import Stack from "@/components/lib/layout/Stack";
import { HeaderLinks } from "./(data)/links";
import HeaderLink from "./(partials)/HeaderLink";
import MobileMenu from "./(sections)/MobileMenu";
type Props = PropsWithChildren & {};
export default function Layout({ children }: Props) {
const [menuOpen, setMenuOpen] = React.useState(false);
return (
<div className="flex flex-row items-stretch w-full min-h-screen">
<Aside />
<div className={twMerge("flex flex-col items-start gap-0", "grow")}>
<Header {...{ menuOpen, setMenuOpen }} />
<main className="w-full items-start flex flex-col gap-0">
{children}
</main>
<Footer />
</div>
<MobileMenu {...{ menuOpen, setMenuOpen }} />
</div>
);
}