1.0.4 • Published 1 year ago

@mozisan/next-layout v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

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} />;
}
1.0.4

1 year ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago