Skip to content

Instantly share code, notes, and snippets.

@codigoconjuan
Created December 13, 2022 17:53
Show Gist options
  • Save codigoconjuan/eff25ae69488bd8636d070d61bbeebd7 to your computer and use it in GitHub Desktop.
Save codigoconjuan/eff25ae69488bd8636d070d61bbeebd7 to your computer and use it in GitHub Desktop.
Layout Panel de Administración Next.js
import Head from "next/head";
import Image from "next/image";
import { ToastContainer } from "react-toastify";
import "react-toastify/dist/ReactToastify.css";
export default function AdminLayout({ children, pagina }) {
return (
<>
<Head>
<title>Café - {pagina}</title>
<meta name="description" content="Quosco Cafetería" />
</Head>
<div className="md:flex">
<aside className="md:w-4/12 xl:w-1/4 2xl:w-1/5 py-5">
<Image
width={300}
height={100}
src="/assets/img/logo.svg"
alt="imagen logotipo"
/>
</aside>
<main className="md:w-8/12 xl:w-3/4 2xl:w-4/5 h-screen overflow-y-scroll">
<div className="p-10">
{children}
</div>
</main>
</div>
<ToastContainer />
</>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment