@mozisan/next-layout
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

next-layout

Installation

npm i -S @mozisan/next-layout

Usage

// pages/foo.tsx
import { defineLayout } from "@mozisan/next-layout";

const withLayout = defineLayout((page) => (
  <div>
    <header>...</header>
    <main>{page}</main>
  </div>
));

export default withLayout(function FooPage() {
  return <div>...</div>;
});
// pages/_app.tsx
import type { AppProps } from "next/app";
import { PageRenderer } from "@mozisan/next-layout";

export default function App(props: AppProps) {
  return <PageRenderer {...props} />;
}

Readme

Keywords

Package Sidebar

Install

npm i @mozisan/next-layout

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

8.65 kB

Total Files

11

Last publish

Collaborators

  • mozisan