webapp/src/components/Layouts/MainLayout.tsx

24 lines
556 B
TypeScript
Raw Normal View History

2022-09-22 09:37:49 +00:00
import type { JSX } from 'solid-js'
import { Header } from '../Nav/Header'
import { Footer } from '../Discours/Footer'
import '../../styles/app.scss'
type Props = {
headerTitle?: string
children: JSX.Element
2022-09-23 21:29:32 +00:00
isHeaderFixed?: boolean
2022-09-22 09:37:49 +00:00
}
export const MainLayout = (props: Props) => {
2022-09-23 21:29:32 +00:00
const isHeaderFixed = props.isHeaderFixed !== undefined ? props.isHeaderFixed : true
2022-09-22 09:37:49 +00:00
return (
<>
2022-09-23 21:29:32 +00:00
<Header title={props.headerTitle} isHeaderFixed={isHeaderFixed} />
2022-09-22 09:37:49 +00:00
<main class="main-content">{props.children}</main>
<Footer />
</>
)
}