Skip to content

Commit

Permalink
Merge pull request #174 from adobecom/MWPW-157434
Browse files Browse the repository at this point in the history
fix(mwpw-157434): Fixes Carousel pagination issues
  • Loading branch information
sheridansunier authored Sep 11, 2024
2 parents cf9df06 + 956c1f4 commit 69d28f5
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 17 deletions.
4 changes: 2 additions & 2 deletions dist/app.css

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions dist/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Chimera UI Libraries - Build 0.20.0 (9/9/2024, 13:21:45)
* Chimera UI Libraries - Build 0.21.0 (9/9/2024, 20:46:25)
*
*/
/******/ (function(modules) { // webpackBootstrap
Expand Down Expand Up @@ -44064,18 +44064,20 @@ function CardsCarousel() {
var showTotalResults = getConfig('collection', 'showTotalResults');
var showTotalResultsText = getConfig('collection', 'i18n.totalResultsText');
var useLightText = getConfig('collection', 'useLightText');
var isIncremental = getConfig('pagination', 'animationStyle') === 'incremental';

if (cardsUp.includes('2up')) {
cardWidth = 500;
cardsShiftedPerClick = 1;
cardsShiftedPerClick = isIncremental ? 1 : 2;
} else if (cardsUp.includes('3up')) {
cardWidth = 378;
cardsShiftedPerClick = 1;
cardsShiftedPerClick = isIncremental ? 1 : 3;
} else if (cardsUp.includes('4up')) {
cardWidth = 276;
cardsShiftedPerClick = 4;
cardsShiftedPerClick = isIncremental ? 1 : 4;
} else if (cardsUp.includes('5up')) {
cardWidth = 228;
cardsShiftedPerClick = 4;
cardsShiftedPerClick = isIncremental ? 1 : 5;
}
var HeadingLevel = getConfig('collection', 'i18n.titleHeadingLevel');
var cardsPerPage = parseInt(cardsUp, 10);
Expand Down
10 changes: 5 additions & 5 deletions dist/main.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/main.source.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions less/components/consonant/cards-carousel.less
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
min-width: 100%;
padding: 8px 0;
overflow-x: scroll;
scroll-behavior: smooth;

@media screen and (min-width: @consonantDesktopMinWidth) {
overflow: -moz-scrollbars-none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,20 @@ function CardsCarousel({
const showTotalResults = getConfig('collection', 'showTotalResults');
const showTotalResultsText = getConfig('collection', 'i18n.totalResultsText');
const useLightText = getConfig('collection', 'useLightText');
const isIncremental = getConfig('pagination', 'animationStyle') === 'incremental';

if (cardsUp.includes('2up')) {
cardWidth = 500;
cardsShiftedPerClick = 1;
cardsShiftedPerClick = isIncremental ? 1 : 2;
} else if (cardsUp.includes('3up')) {
cardWidth = 378;
cardsShiftedPerClick = 1;
cardsShiftedPerClick = isIncremental ? 1 : 3;
} else if (cardsUp.includes('4up')) {
cardWidth = 276;
cardsShiftedPerClick = 4;
cardsShiftedPerClick = isIncremental ? 1 : 4;
} else if (cardsUp.includes('5up')) {
cardWidth = 228;
cardsShiftedPerClick = 4;
cardsShiftedPerClick = isIncremental ? 1 : 5;
}
const HeadingLevel = getConfig('collection', 'i18n.titleHeadingLevel');
const cardsPerPage = parseInt(cardsUp, 10);
Expand Down

0 comments on commit 69d28f5

Please sign in to comment.