Skip to content

Commit

Permalink
WS2-1197: Changing Card Carousel target selector.
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmitriatti committed Nov 3, 2022
1 parent 4729891 commit 09b263a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/ReactComponentCardCarousel.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ class ReactComponentCardCarousel implements ReactComponent {

public function buildSettings(&$variables) {
$block = $variables['content']['#block_content'];
$variables['content']['#prefix'] = '<div id="cardCarouselContainer"></div>';


$rand_id = random_int(0, PHP_INT_MAX);
$carousel_card_id = 'cardCarouselContainer-' . $rand_id;
$block_id = 'asu-card-carousel-container-' . $rand_id;
$variables['attributes']['class'][] = 'asu-card-carousel-container';


$variables['content']['#prefix'] = '<div id="' . $carousel_card_id . '"></div>';
$variables['attributes']['id'] = $block_id;

$variables['attributes']['class'][] = 'asu-card-carousel-container';

$card_carousel = new \stdClass();
$card_carousel->targetSelector = $block_id;
$card_carousel->targetSelector = $carousel_card_id;
$card_carousel->items = [];

if ($block->field_card_orientation) {
Expand Down

0 comments on commit 09b263a

Please sign in to comment.