2023-05-23 11:06:58 +03:00
|
|
|
interface PageHeadingProps {
|
|
|
|
title: string;
|
|
|
|
subtitle?: string;
|
|
|
|
}
|
|
|
|
|
2023-06-15 12:52:46 +03:00
|
|
|
const PageHeading = ({ title, subtitle }: PageHeadingProps): JSX.Element => {
|
2023-05-23 11:06:58 +03:00
|
|
|
return (
|
2023-05-27 17:42:48 +03:00
|
|
|
<div className="flex flex-col items-center justify-center px-5">
|
2023-08-07 15:13:41 +03:00
|
|
|
<h1
|
|
|
|
data-testid="page-heading-title"
|
|
|
|
className="text-3xl font-bold text-center"
|
|
|
|
>
|
|
|
|
{title}
|
|
|
|
</h1>
|
2023-06-15 12:52:46 +03:00
|
|
|
{subtitle !== undefined && (
|
2023-08-07 15:13:41 +03:00
|
|
|
<h2
|
|
|
|
data-testid="page-heading-subtitle"
|
|
|
|
className="opacity-50 text-center"
|
|
|
|
>
|
|
|
|
{subtitle}
|
|
|
|
</h2>
|
2023-06-15 12:52:46 +03:00
|
|
|
)}
|
2023-05-23 11:06:58 +03:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default PageHeading;
|