fix(BOOK-204): Added dynamic h1 to startpage
Approved-by: Christel Westerberg
This commit is contained in:
@@ -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 && (
|
||||
|
||||
Reference in New Issue
Block a user