Merged in SW-1382-start-page-offers-section (pull request #1221)
SW-1382 start page offers section * feat(SW-1382): Add InfoCard component to CardsGrid and StartPage * feat(SW-1382): Add dynamic image positioning for InfoCard in CardsGrid * refactor(SW-1382): Update InfoCard data transformation and prop naming * fix(SW-1382): Add flex display to InfoCard image container Approved-by: Christian Andolf Approved-by: Erik Tiekstra
This commit is contained in:
@@ -2,12 +2,14 @@ import type { Block as AccountPageBlock } from "@/types/trpc/routers/contentstac
|
||||
import type { Block as CollectionPageBlock } from "@/types/trpc/routers/contentstack/collectionPage"
|
||||
import type { Block as ContentPageBlock } from "@/types/trpc/routers/contentstack/contentPage"
|
||||
import type { Block as LoyaltyPageBlock } from "@/types/trpc/routers/contentstack/loyaltyPage"
|
||||
import type { Block as StartPageBlock } from "@/types/trpc/routers/contentstack/startPage"
|
||||
|
||||
export type Blocks =
|
||||
| AccountPageBlock
|
||||
| CollectionPageBlock
|
||||
| ContentPageBlock
|
||||
| LoyaltyPageBlock
|
||||
| StartPageBlock
|
||||
|
||||
export interface BlocksProps {
|
||||
blocks: Blocks[]
|
||||
|
||||
22
types/components/blocks/infoCard.ts
Normal file
22
types/components/blocks/infoCard.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import type { VariantProps } from "class-variance-authority"
|
||||
|
||||
import type { ImageVaultAsset } from "@/types/components/imageVault"
|
||||
import type { CardProps } from "@/components/TempDesignSystem/Card/card"
|
||||
import type { cardVariants } from "@/components/TempDesignSystem/Card/variants"
|
||||
|
||||
type CardTheme = Exclude<
|
||||
NonNullable<VariantProps<typeof cardVariants>["theme"]>,
|
||||
"image"
|
||||
>
|
||||
|
||||
export interface InfoCardProps {
|
||||
scriptedTopTitle?: string
|
||||
heading: string
|
||||
bodyText: string
|
||||
image?: ImageVaultAsset
|
||||
imagePosition?: "left" | "right"
|
||||
primaryButton?: CardProps["primaryButton"]
|
||||
secondaryButton?: CardProps["secondaryButton"]
|
||||
theme?: CardTheme
|
||||
className?: string
|
||||
}
|
||||
Reference in New Issue
Block a user