Created
April 30, 2021 08:18
-
-
Save kjmczk/0d88ecd5026c0fc9f1398d1ad2988711 to your computer and use it in GitHub Desktop.
components/Layout.tsx - MDX Blog Simple - Medium
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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