2021-08-15 16:07:05 +02:00
|
|
|
import { Box, Container, Heading, Text } from '@chakra-ui/react';
|
2021-08-16 18:15:54 +02:00
|
|
|
import React from 'react';
|
2021-08-15 16:07:05 +02:00
|
|
|
|
|
|
|
type PageHeaderProps = {
|
|
|
|
title: string;
|
|
|
|
subtitle: string;
|
2021-08-16 18:15:54 +02:00
|
|
|
children?: React.ReactNode;
|
2021-08-15 16:07:05 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
export function PageHeader(props: PageHeaderProps) {
|
2021-08-16 18:15:54 +02:00
|
|
|
const { title, subtitle, children } = props;
|
2021-08-15 16:07:05 +02:00
|
|
|
|
|
|
|
return (
|
|
|
|
<Box pt='45px' pb='30px' borderBottomWidth={1} mb='30px'>
|
|
|
|
<Container maxW='container.md' position='relative'>
|
|
|
|
<Heading as='h1' color='black' fontSize='35px' fontWeight={700} mb='5px'>{title}</Heading>
|
|
|
|
<Text fontSize='15px'>{subtitle}</Text>
|
|
|
|
</Container>
|
2021-08-16 18:15:54 +02:00
|
|
|
|
|
|
|
{children && (
|
|
|
|
<Container maxW='container.md'>
|
|
|
|
{children}
|
|
|
|
</Container>
|
|
|
|
)}
|
2021-08-15 16:07:05 +02:00
|
|
|
</Box>
|
|
|
|
);
|
|
|
|
}
|