tailwind-nextjs-blog/components/LayoutWrapper.tsx

28 lines
617 B
TypeScript
Raw Normal View History

import { Inter } from 'next/font/google'
import SectionContainer from './SectionContainer'
import Footer from './Footer'
import { ReactNode } from 'react'
import Header from './Header'
2022-07-17 21:40:41 +08:00
interface Props {
children: ReactNode
}
const inter = Inter({
subsets: ['latin'],
})
const LayoutWrapper = ({ children }: Props) => {
2022-07-17 21:40:41 +08:00
return (
<SectionContainer>
<div className={`${inter.className} flex h-screen flex-col justify-between font-sans`}>
<Header />
2022-07-17 21:40:41 +08:00
<main className="mb-auto">{children}</main>
<Footer />
</div>
</SectionContainer>
)
}
2022-07-17 21:40:41 +08:00
export default LayoutWrapper