feat(SW-391): Added sidepeek functionality to teasercard

This commit is contained in:
Erik Tiekstra
2024-10-10 08:13:50 +02:00
parent a5d9eb43c9
commit 9620071c78
21 changed files with 311 additions and 69 deletions

View File

@@ -2,11 +2,12 @@ import { VariantProps } from "class-variance-authority"
import { teaserCardVariants } from "@/components/TempDesignSystem/TeaserCard/variants"
import { ImageVaultAsset } from "@/types/components/imageVault"
import type { ImageVaultAsset } from "@/types/components/imageVault"
import type { CardProps } from "@/components/TempDesignSystem/Card/card"
import type { TeaserCard } from "../trpc/routers/contentstack/blocks"
interface SidePeekButton {
title: string
call_to_action_text: string
}
export interface TeaserCardProps
@@ -16,6 +17,12 @@ export interface TeaserCardProps
primaryButton?: CardProps["primaryButton"]
secondaryButton?: CardProps["secondaryButton"]
sidePeekButton?: SidePeekButton
sidePeekContent?: TeaserCard["sidepeek_content"]
image?: ImageVaultAsset
className?: string
}
export interface TeaserCardSidepeekProps {
button: SidePeekButton
data: NonNullable<TeaserCard["sidepeek_content"]>
}

View File

@@ -1,6 +1,9 @@
import { z } from "zod"
import { cardsGridSchema } from "@/server/routers/contentstack/schemas/blocks/cardsGrid"
import {
cardsGridSchema,
teaserCardBlockSchema,
} from "@/server/routers/contentstack/schemas/blocks/cardsGrid"
import { contentSchema } from "@/server/routers/contentstack/schemas/blocks/content"
import { dynamicContentSchema } from "@/server/routers/contentstack/schemas/blocks/dynamicContent"
import { shortcutsSchema } from "@/server/routers/contentstack/schemas/blocks/shortcuts"
@@ -8,6 +11,13 @@ import { tableSchema } from "@/server/routers/contentstack/schemas/blocks/table"
import { textColsSchema } from "@/server/routers/contentstack/schemas/blocks/textCols"
import { uspGridSchema } from "@/server/routers/contentstack/schemas/blocks/uspGrid"
export enum CardsGridLayoutEnum {
TWO_COLUMNS = "twoColumnGrid",
THREE_COLUMNS = "threeColumnGrid",
TWO_PLUS_ONE = "twoPlusOne",
}
export interface TeaserCard extends z.output<typeof teaserCardBlockSchema> {}
export interface CardsGrid extends z.output<typeof cardsGridSchema> {}
export interface Content extends z.output<typeof contentSchema> {}
export interface DynamicContent extends z.output<typeof dynamicContentSchema> {}