import { cx, type VariantProps } from "class-variance-authority" import { Typography } from "@scandic-hotels/design-system/Typography" import { headingVariants } from "@/components/Section/Header/headingVariants" import SectionLink from "../Link" import styles from "./header.module.css" import type { HTMLAttributes } from "react" interface SectionHeaderProps extends HTMLAttributes, VariantProps { heading?: string headingLevel?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" preamble?: string | null link?: { href: string text: string } } export function SectionHeader({ className, heading, preamble, link, typography = "Title/sm", headingLevel = "h2", ...props }: SectionHeaderProps) { if (!heading && !preamble && !link) { return null } const headingClassNames = headingVariants({ typography }) const Hx = headingLevel return (
{heading} {preamble ? (

{preamble}

) : null} {link ? : null}
) }