Skip to content

Commit

Permalink
Update libs/features/mas/web-components/src/merch-datasource.js
Browse files Browse the repository at this point in the history
Co-authored-by: Axel Cureno Basurto <axelcureno@gmail.com>
  • Loading branch information
yesil and Axelcureno authored Aug 28, 2024
1 parent 0cc57e0 commit cb36075
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions libs/features/mas/web-components/src/merch-datasource.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,41 @@ const cardContent = {
slot: 'body-xs',
},
ctas: { size: 'l' },
const VARIANTS = {
CATALOG: 'catalog',
AH: 'ah',
CCD_ACTION: 'ccd-action',
SPECIAL_OFFERS: 'special-offers',
};

const cardContent = {
[VARIANTS.CATALOG]: {
title: { tag: 'h3', slot: 'heading-xs' },
prices: { tag: 'h3', slot: 'heading-xs' },
description: { tag: 'div', slot: 'body-xs' },
ctas: { size: 'l' },
},
[VARIANTS.AH]: {
title: { tag: 'h3', slot: 'heading-xxs' },
prices: { tag: 'h3', slot: 'heading-xs' },
description: { tag: 'div', slot: 'body-xxs' },
ctas: { size: 's' },
},
[VARIANTS.CCD_ACTION]: {
title: { tag: 'h3', slot: 'heading-xs' },
prices: { tag: 'h3', slot: 'heading-xs' },
description: { tag: 'div', slot: 'body-xs' },
ctas: { size: 'l' },
},
[VARIANTS.SPECIAL_OFFERS]: {
name: { tag: 'h4', slot: 'detail-m' },
title: { tag: 'h4', slot: 'detail-m' },
backgroundImage: { tag: 'div', slot: 'bg-image' },
prices: { tag: 'h3', slot: 'heading-xs' },
description: { tag: 'div', slot: 'body-xs' },
ctas: { size: 'l' },
},
};
};

async function parseMerchCard(fragmentData, appendFn, merchCard, consonant) {
Expand Down

0 comments on commit cb36075

Please sign in to comment.