Files
web/components/Section/Header/index.tsx
Matilda Landström c6ad107e49 Merged in feat/section-header-link (pull request #314)
Feat(WEB-359): Update section link for mobile

Approved-by: Chuma Mcphoy (We Ahead)
Approved-by: Arvid Norlin
2024-07-04 10:42:01 +00:00

30 lines
745 B
TypeScript

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