Skip to content

Commit

Permalink
Merge pull request #43 from ASUWebPlatforms/WS2-1237
Browse files Browse the repository at this point in the history
WS2-1237: Sending showBorders prop to React Card componenets.
  • Loading branch information
mlsamuelson authored Feb 9, 2023
2 parents 0fd2b30 + 6f32d5b commit be745a0
Show file tree
Hide file tree
Showing 13 changed files with 2,980 additions and 2,783 deletions.
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,24 @@ node_modules/@asu-design-system/components-core/*
node_modules/@asu-design-system/components-core/dist/*
!node_modules/@asu-design-system/components-core/dist/libCore.min.js
!node_modules/@asu-design-system/components-core/dist/libCore.umd.js

!node_modules/@asu
node_modules/@asu/*
!node_modules/@asu/component-carousel
node_modules/@asu/component-carousel/*
!node_modules/@asu/component-carousel/dist
node_modules/@asu/component-carousel/dist/*
!node_modules/@asu/component-carousel/dist/carousel.production.js
!node_modules/@asu/component-carousel/dist/core.production.js
!node_modules/@asu/component-carousel/dist/vendor.production.js
!node_modules/@asu/component-carousel/dist/asuCarousel.umd.js
!node_modules/@asu/component-carousel/dist/vendor.umd.js
!node_modules/@asu/components-core
node_modules/@asu/components-core/*
!node_modules/@asu/components-core/dist
node_modules/@asu/components-core/dist/*
!node_modules/@asu/components-core/dist/libCore.min.js
!node_modules/@asu/components-core/dist/libCore.umd.js

.idea/
.DS_Store
8 changes: 4 additions & 4 deletions asu_react_core.libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ react-core:
- core/drupalSettings
- asu_react_integration/reactjs
js:
node_modules/@asu-design-system/components-core/dist/libCore.umd.js: {}
node_modules/@asu/components-core/dist/libCore.umd.js: {}
react-carousel:
version: 0.0.1
dependencies:
- asu_react_core/react-core
js:
node_modules/@asu-design-system/component-carousel/dist/vendor.umd.js: { }
node_modules/@asu-design-system/component-carousel/dist/asuCarousel.umd.js: {}
node_modules/@asu/component-carousel/dist/vendor.umd.js: { }
node_modules/@asu/component-carousel/dist/asuCarousel.umd.js: {}
testimonial-carousel:
version: 0.0.1
dependencies:
Expand Down Expand Up @@ -61,4 +61,4 @@ testimonial-on-image-background:
dependencies:
- asu_react_core/react-core
js:
js/testimonial-on-image-background.js: { }
js/testimonial-on-image-background.js: { }
1 change: 1 addition & 0 deletions js/component-card-arrangement.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
linkLabel: card.linkLabel,
linkUrl: card.linkUrl,
tags: card.tags,
showBorders: card.showBorders,
},
});
});
Expand Down
1 change: 1 addition & 0 deletions js/component-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
linkLabel: card.linkLabel,
linkUrl: card.linkUrl,
tags: card.tags,
showBorders: card.showBorders,
},
});

Expand Down

This file was deleted.

This file was deleted.

226 changes: 0 additions & 226 deletions node_modules/@asu-design-system/components-core/dist/libCore.umd.js

This file was deleted.

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions node_modules/@asu/component-carousel/dist/vendor.umd.js

Large diffs are not rendered by default.

226 changes: 226 additions & 0 deletions node_modules/@asu/components-core/dist/libCore.umd.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"@asu-design-system/component-carousel": "1.16.0",
"@asu-design-system/components-core": "1.26.8"
"@asu/component-carousel": "1.2.0",
"@asu/components-core": "1.4.0"
}
}
5 changes: 5 additions & 0 deletions src/Utils/ReactComponentHelperFunctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ public function getCardContent($paragraph) {
$card->clickHref = $link->toString();
}

$card->showBorders = false;
if ($paragraph->field_show_borders && $paragraph->field_show_borders->value) {
$card->showBorders = true;
}

$settings = [];
$settings['components']['card'][$id] = $card;

Expand Down
5,266 changes: 2,719 additions & 2,547 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit be745a0

Please sign in to comment.