www/components/layout.tsx
Paul W. 35d56f5cde
Bump script ver and refactor md metadata gen
Signed-off-by: Paul W. <lambdapaul@protonmail.com>
2023-10-30 00:18:38 -04:00

28 lines
596 B
TypeScript

import Title from './title';
type ChildrenType = JSX.Element | Array<ChildrenType>;
type LayoutProps = {
children?: ChildrenType,
removeContainer?: boolean,
};
function Container(props: {children?: ChildrenType, ignore?: boolean}) {
if (props.ignore)
return <>{props.children}</>;
return <div className='container'>
{props.children}
</div>;
}
function Layout(props : LayoutProps) {
return (
<>
<Title />
<Container ignore={props.removeContainer}>{props.children}</Container>
</>
);
}
export default Layout;