Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulgupta999 committed Sep 26, 2024
1 parent 268e821 commit 76173ad
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
4 changes: 4 additions & 0 deletions libs/blocks/merch-card/merch-card.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ div[class*="-merch-card"] > div,
display: none;
}

merch-card .body-lower > hr {
width: 100%
}

.merch-card-price {
margin-top: 8px;
margin-bottom: 16px;
Expand Down
1 change: 0 additions & 1 deletion libs/blocks/merch-card/merch-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ const simplifyHrs = (el) => {
hrs.forEach((hr) => {
if (hr.parentElement.tagName === 'P') {
hr.parentElement.replaceWith(hr);
hr.style.width = '100%';
}
});
if (el.variant === PRODUCT) {
Expand Down
2 changes: 1 addition & 1 deletion libs/deps/mas/mas.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions libs/deps/mas/merch-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ merch-card[variant="plans"] [slot="quantity-select"] {
<slot name="callout-content"></slot>
<slot name="body-lower"></slot>
</div>
${this.secureLabelFooter}`}connectedCallbackHook(){super.connectedCallbackHook(),window.addEventListener("resize",this.postCardUpdateHook.bind(this))}disconnectedCallbackHook(){window.removeEventListener("resize",this.postCardUpdateHook.bind(this)),super.disconnectedCallbackHook()}postCardUpdateHook(){T()||this.adjustProductBodySlots()}static variantStyle=bt`
${this.secureLabelFooter}`}connectedCallbackHook(){super.connectedCallbackHook(),window.addEventListener("resize",this.postCardUpdateHook.bind(this))}postCardUpdateHook(){T()||this.adjustProductBodySlots()}static variantStyle=bt`
:host([variant='product']) > slot:not([name='icons']) {
display: block;
}
Expand All @@ -1040,7 +1040,7 @@ merch-card[variant="plans"] [slot="quantity-select"] {
min-height: var(--consonant-merch-card-product-callout-content-height);
display: block;
}
`};import{html as U,css as yt}from"../lit-all.min.js";var nt=`
`};import{html as V,css as yt}from"../lit-all.min.js";var nt=`
:root {
--consonant-merch-card-segment-width: 378px;
}
Expand Down Expand Up @@ -1086,13 +1086,13 @@ merch-card[variant="plans"] [slot="quantity-select"] {
grid-template-columns: repeat(4, minmax(276px, var(--consonant-merch-card-segment-width)));
}
}
`;var E=class extends d{constructor(t){super(t)}getGlobalCSS(){return nt}postCardUpdateHook(){this.adjustTitleWidth()}renderLayout(){return U` ${this.badge}
`;var E=class extends d{constructor(t){super(t)}getGlobalCSS(){return nt}postCardUpdateHook(){this.adjustTitleWidth()}renderLayout(){return V` ${this.badge}
<div class="body">
<slot name="heading-xs"></slot>
<slot name="body-xxs"></slot>
${this.promoBottom?"":U`<slot name="promo-text"></slot><slot name="callout-content"></slot>`}
${this.promoBottom?"":V`<slot name="promo-text"></slot><slot name="callout-content"></slot>`}
<slot name="body-xs"></slot>
${this.promoBottom?U`<slot name="promo-text"></slot><slot name="callout-content"></slot>`:""}
${this.promoBottom?V`<slot name="promo-text"></slot><slot name="callout-content"></slot>`:""}
</div>
<hr />
${this.secureLabelFooter}`}static variantStyle=yt`
Expand All @@ -1102,7 +1102,7 @@ merch-card[variant="plans"] [slot="quantity-select"] {
:host([variant='segment']) ::slotted([slot='heading-xs']) {
max-width: var(--consonant-merch-card-heading-xs-max-width, 100%);
}
`};import{html as V,css as wt}from"../lit-all.min.js";var ct=`
`};import{html as U,css as wt}from"../lit-all.min.js";var ct=`
:root {
--consonant-merch-card-special-offers-width: 378px;
}
Expand Down Expand Up @@ -1150,20 +1150,20 @@ merch-card[variant="special-offers"] span[is="inline-price"][data-template="stri
grid-template-columns: repeat(4, minmax(300px, var(--consonant-merch-card-special-offers-width)));
}
}
`;var S=class extends d{constructor(t){super(t)}getGlobalCSS(){return ct}get headingSelector(){return'[slot="detail-m"]'}renderLayout(){return V`${this.cardImage}
`;var S=class extends d{constructor(t){super(t)}getGlobalCSS(){return ct}get headingSelector(){return'[slot="detail-m"]'}renderLayout(){return U`${this.cardImage}
<div class="body">
<slot name="detail-m"></slot>
<slot name="heading-xs"></slot>
<slot name="body-xs"></slot>
</div>
${this.evergreen?V`
${this.evergreen?U`
<div
class="detail-bg-container"
style="background: ${this.card.detailBg}"
>
<slot name="detail-bg"></slot>
</div>
`:V`
`:U`
<hr />
${this.secureLabelFooter}
`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Merch Card Web Component Product Variant demo page</title>
<link
rel="stylesheet"
href="http://localhost:2023/__wds-outside-root__/3/styles/styles.css"
/>
<script>
window.process = {
env: {},
Expand Down

0 comments on commit 76173ad

Please sign in to comment.