fix(BOOK-204): Added dynamic h1 to startpage

Approved-by: Christel Westerberg
This commit is contained in:
Erik Tiekstra
2025-11-26 14:26:11 +00:00
parent 05ed0533fb
commit 6ac8267c31
14 changed files with 199 additions and 155 deletions

View File

@@ -5,15 +5,27 @@ import { useState } from "react"
import { Carousel } from "@/components/Carousel"
import ContentCard from "@/components/ContentCard"
import { Section } from "@/components/Section"
import SectionHeader from "@/components/Section/Header/Deprecated"
import { SectionHeader } from "@/components/Section/Header"
import SectionLink from "@/components/Section/Link"
import TabFilters from "@/components/TabFilters"
import styles from "./carouselCards.module.css"
import type { CarouselCardsProps } from "@/types/components/blocks/carouselCards"
import type { CarouselCards as CarouselCardsBlock } from "@scandic-hotels/trpc/types/blocks"
import type { VariantProps } from "class-variance-authority"
export default function CarouselCards({ carousel_cards }: CarouselCardsProps) {
import type { headingVariants } from "@/components/Section/Header/headingVariants"
interface CarouselCardsProps
extends Pick<CarouselCardsBlock, "carousel_cards"> {
headingLevel?: "h1" | "h2"
headingTypography?: VariantProps<typeof headingVariants>["typography"]
}
export default function CarouselCards({
carousel_cards,
headingLevel = "h2",
headingTypography = "Title/sm",
}: CarouselCardsProps) {
const {
heading,
preamble,
@@ -37,10 +49,10 @@ export default function CarouselCards({ carousel_cards }: CarouselCardsProps) {
return (
<Section>
<SectionHeader
title={heading}
heading={heading}
preamble={preamble}
headingLevel="h2"
headingAs="h3"
headingLevel={headingLevel}
typography={headingTypography}
link={link}
/>
{filterCategories.length > 0 && activeFilter && (