Files
developer-roadmap/components/page-header.tsx

36 lines
896 B
TypeScript
Raw Normal View History

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 (
2021-09-03 10:52:43 +02:00
<Box pt={['25px', '20px', '45px']} pb={['20px', '15px', '30px']} borderBottomWidth={1} mb='30px'>
2021-08-15 16:07:05 +02:00
<Container maxW='container.md' position='relative'>
2021-08-28 13:50:44 +02:00
<Heading
as='h1'
color='black'
2021-09-09 22:32:12 +02:00
fontSize={['28px', '33px', '40px']}
2021-08-28 13:50:44 +02:00
fontWeight={700}
mb={['2px', '2px', '5px']}
>
{title}
</Heading>
2021-09-09 22:32:12 +02:00
<Text fontSize={['13px', '14px', '15px']}>{subtitle}</Text>
2021-08-15 16:07:05 +02:00
</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>
);
}