|
|
|
|
@@ -23,41 +23,6 @@ type ProductCard = {
|
|
|
|
|
isFavorited?: boolean;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
interface ProductCardOneProps {
|
|
|
|
|
products: ProductCard[];
|
|
|
|
|
carouselMode?: "auto" | "buttons";
|
|
|
|
|
gridVariant: ProductCardOneGridVariant;
|
|
|
|
|
uniformGridCustomHeightClasses?: string;
|
|
|
|
|
animationType: CardAnimationType;
|
|
|
|
|
title: string;
|
|
|
|
|
titleSegments?: TitleSegment[];
|
|
|
|
|
description: string;
|
|
|
|
|
tag?: string;
|
|
|
|
|
tagIcon?: LucideIcon;
|
|
|
|
|
buttons?: ButtonConfig[];
|
|
|
|
|
textboxLayout: TextboxLayout;
|
|
|
|
|
useInvertedBackground: InvertedBackground;
|
|
|
|
|
ariaLabel?: string;
|
|
|
|
|
className?: string;
|
|
|
|
|
containerClassName?: string;
|
|
|
|
|
cardClassName?: string;
|
|
|
|
|
imageClassName?: string;
|
|
|
|
|
textBoxTitleClassName?: string;
|
|
|
|
|
textBoxTitleImageWrapperClassName?: string;
|
|
|
|
|
textBoxTitleImageClassName?: string;
|
|
|
|
|
textBoxDescriptionClassName?: string;
|
|
|
|
|
cardNameClassName?: string;
|
|
|
|
|
cardPriceClassName?: string;
|
|
|
|
|
gridClassName?: string;
|
|
|
|
|
carouselClassName?: string;
|
|
|
|
|
controlsClassName?: string;
|
|
|
|
|
textBoxClassName?: string;
|
|
|
|
|
textBoxTagClassName?: string;
|
|
|
|
|
textBoxButtonContainerClassName?: string;
|
|
|
|
|
textBoxButtonClassName?: string;
|
|
|
|
|
textBoxButtonTextClassName?: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
interface ProductCardItemProps {
|
|
|
|
|
product: ProductCard;
|
|
|
|
|
shouldUseLightText: boolean;
|
|
|
|
|
@@ -152,48 +117,50 @@ const ProductCardOne = ({
|
|
|
|
|
const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle);
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<CardStack
|
|
|
|
|
mode={carouselMode}
|
|
|
|
|
gridVariant={gridVariant}
|
|
|
|
|
uniformGridCustomHeightClasses={uniformGridCustomHeightClasses}
|
|
|
|
|
animationType={animationType}
|
|
|
|
|
|
|
|
|
|
title={title}
|
|
|
|
|
titleSegments={titleSegments}
|
|
|
|
|
description={description}
|
|
|
|
|
tag={tag}
|
|
|
|
|
tagIcon={tagIcon}
|
|
|
|
|
buttons={buttons}
|
|
|
|
|
textboxLayout={textboxLayout}
|
|
|
|
|
useInvertedBackground={useInvertedBackground}
|
|
|
|
|
className={className}
|
|
|
|
|
containerClassName={containerClassName}
|
|
|
|
|
gridClassName={gridClassName}
|
|
|
|
|
carouselClassName={carouselClassName}
|
|
|
|
|
controlsClassName={controlsClassName}
|
|
|
|
|
textBoxClassName={textBoxClassName}
|
|
|
|
|
titleClassName={textBoxTitleClassName}
|
|
|
|
|
titleImageWrapperClassName={textBoxTitleImageWrapperClassName}
|
|
|
|
|
titleImageClassName={textBoxTitleImageClassName}
|
|
|
|
|
descriptionClassName={textBoxDescriptionClassName}
|
|
|
|
|
tagClassName={textBoxTagClassName}
|
|
|
|
|
buttonContainerClassName={textBoxButtonContainerClassName}
|
|
|
|
|
buttonClassName={textBoxButtonClassName}
|
|
|
|
|
buttonTextClassName={textBoxButtonTextClassName}
|
|
|
|
|
ariaLabel={ariaLabel}
|
|
|
|
|
>
|
|
|
|
|
{products.map((product, index) => (
|
|
|
|
|
<ProductCardItem
|
|
|
|
|
key={`${product.id}-${index}`}
|
|
|
|
|
product={product}
|
|
|
|
|
shouldUseLightText={shouldUseLightText}
|
|
|
|
|
cardClassName={cardClassName}
|
|
|
|
|
imageClassName={imageClassName}
|
|
|
|
|
cardNameClassName={cardNameClassName}
|
|
|
|
|
cardPriceClassName={cardPriceClassName}
|
|
|
|
|
/>
|
|
|
|
|
))}
|
|
|
|
|
</CardStack>
|
|
|
|
|
<>
|
|
|
|
|
<span className="inline-block px-3 py-1 text-sm font-medium rounded-full bg-primary-cta/10 text-primary-cta">New Course</span>
|
|
|
|
|
<CardStack
|
|
|
|
|
mode={carouselMode}
|
|
|
|
|
gridVariant={gridVariant}
|
|
|
|
|
uniformGridCustomHeightClasses={uniformGridCustomHeightClasses}
|
|
|
|
|
animationType={animationType}
|
|
|
|
|
title={title}
|
|
|
|
|
titleSegments={titleSegments}
|
|
|
|
|
description={description}
|
|
|
|
|
tag={tag}
|
|
|
|
|
tagIcon={tagIcon}
|
|
|
|
|
buttons={buttons}
|
|
|
|
|
textboxLayout={textboxLayout}
|
|
|
|
|
useInvertedBackground={useInvertedBackground}
|
|
|
|
|
className={className}
|
|
|
|
|
containerClassName={containerClassName}
|
|
|
|
|
gridClassName={gridClassName}
|
|
|
|
|
carouselClassName={carouselClassName}
|
|
|
|
|
controlsClassName={controlsClassName}
|
|
|
|
|
textBoxClassName={textBoxClassName}
|
|
|
|
|
titleClassName={textBoxTitleClassName}
|
|
|
|
|
titleImageWrapperClassName={textBoxTitleImageWrapperClassName}
|
|
|
|
|
titleImageClassName={textBoxTitleImageClassName}
|
|
|
|
|
descriptionClassName={textBoxDescriptionClassName}
|
|
|
|
|
tagClassName={textBoxTagClassName}
|
|
|
|
|
buttonContainerClassName={textBoxButtonContainerClassName}
|
|
|
|
|
buttonClassName={textBoxButtonClassName}
|
|
|
|
|
buttonTextClassName={textBoxButtonTextClassName}
|
|
|
|
|
ariaLabel={ariaLabel}
|
|
|
|
|
>
|
|
|
|
|
{products.map((product, index) => (
|
|
|
|
|
<ProductCardItem
|
|
|
|
|
key={`${product.id}-${index}`}
|
|
|
|
|
product={product}
|
|
|
|
|
shouldUseLightText={shouldUseLightText}
|
|
|
|
|
cardClassName={cardClassName}
|
|
|
|
|
imageClassName={imageClassName}
|
|
|
|
|
cardNameClassName={cardNameClassName}
|
|
|
|
|
cardPriceClassName={cardPriceClassName}
|
|
|
|
|
/>
|
|
|
|
|
))}
|
|
|
|
|
</CardStack>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|