Skip to content

Instantly share code, notes, and snippets.

@kjmczk
Created April 30, 2021 08:18
Show Gist options
  • Save kjmczk/0d88ecd5026c0fc9f1398d1ad2988711 to your computer and use it in GitHub Desktop.
Save kjmczk/0d88ecd5026c0fc9f1398d1ad2988711 to your computer and use it in GitHub Desktop.
components/Layout.tsx - MDX Blog Simple - Medium
// components/Layout.tsx
import Header from '../components/Header';
import Meta from '../components/Meta';
type Props = {
children: React.ReactNode;
pageTitle?: string;
};
const Layout: React.FC<Props> = ({ children, pageTitle }: Props) => {
return (
<>
<Meta pageTitle={pageTitle} />
<div className="max-w-prose mx-auto px-4">
<Header />
<main className="pt-4 pb-12">{children}</main>
</div>
</>
);
};
export default Layout;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment