Skip to content

Commit

Permalink
Merge pull request #83 from adobecom/MWPW-133908
Browse files Browse the repository at this point in the history
fix: Sets cards images as background images (MWPW-133908)
  • Loading branch information
sanrai authored Jul 24, 2023
2 parents bac0c3d + d303afe commit 9a88973
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 15 deletions.
4 changes: 2 additions & 2 deletions dist/app.css

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions dist/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Chimera UI Libraries - Build 6/30/2023, 14:16:26
* Chimera UI Libraries - Build 7/21/2023, 14:41:31
*
*/
/******/ (function(modules) { // webpackBootstrap
Expand Down Expand Up @@ -50184,8 +50184,10 @@ var OneHalfCard = function OneHalfCard(props) {
'div',
{
'data-testid': 'consonant-OneHalfCard-img',
className: 'consonant-OneHalfCard-img' },
_react2.default.createElement('img', { src: image, alt: altText, 'aria-label': altText, loading: 'lazy' }),
className: 'consonant-OneHalfCard-img',
style: { backgroundImage: 'url("' + image + '")' },
role: altText && 'img',
'aria-label': altText },
hasBanner && !disableBanners && _react2.default.createElement(
'span',
{
Expand Down
4 changes: 2 additions & 2 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.

5 changes: 0 additions & 5 deletions less/components/consonant/cards/one-half.less
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@
border-top-right-radius: 4px;
text-align: center;
overflow: hidden;

img {
width: 100%;
min-height: 100%;
}
}

&-videoIco {
Expand Down
6 changes: 4 additions & 2 deletions react/src/js/components/Consonant/Cards/OneHalf.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,10 @@ const OneHalfCard = (props) => {
id={id}>
<div
data-testid="consonant-OneHalfCard-img"
className="consonant-OneHalfCard-img">
<img src={image} alt={altText} aria-label={altText} loading="lazy" />
className="consonant-OneHalfCard-img"
style={{ backgroundImage: `url("${image}")` }}
role={altText && 'img'}
aria-label={altText}>
{hasBanner && !disableBanners &&
<span
data-testid="consonant-OneHalfCard-banner"
Expand Down

0 comments on commit 9a88973

Please sign in to comment.