Files
web/components/MyPages/Blocks/Header/index.tsx
2024-05-30 17:56:56 +02:00

33 lines
806 B
TypeScript

import Link from "@/components/TempDesignSystem/Link"
import Subtitle from "@/components/TempDesignSystem/Subtitle"
import Title from "@/components/TempDesignSystem/Title"
import styles from "./header.module.css"
import type { HeaderProps } from "@/types/components/myPages/stays/title"
export default function Header({
link,
subtitle,
title,
topTitle = false,
}: HeaderProps) {
return (
<header className={styles.header}>
<Title
as={topTitle ? "h2" : "h3"}
className={styles.title}
level={topTitle ? "h1" : "h2"}
>
{title}
</Title>
{link && (
<Link className={styles.link} href={link.href}>
{link.text}
</Link>
)}
<Subtitle className={styles.subtitle}>{subtitle}</Subtitle>
</header>
)
}