Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken CSS classes and update JS unit snapshots #45732

Merged
merged 2 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const TotalsFooterItem = ( {

const priceComponent = (
<FormattedMonetaryAmount
className="wc-block-components-totals-item__value"
className="wc-block-components-totals-footer-item-tax-value"
currency={ currency }
value={ parseInt( totalPrice, 10 ) }
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ exports[`TotalsFooterItem Does not show the "including %s of tax" line if tax is
>
Total
</span>
<span
class="wc-block-formatted-money-amount wc-block-components-formatted-money-amount wc-block-components-totals-item__value"
<div
class="wc-block-components-totals-item__value"
>
£85.00
</span>
<span
class="wc-block-formatted-money-amount wc-block-components-formatted-money-amount wc-block-components-totals-footer-item-tax-value"
>
£85.00
</span>
</div>
<div
class="wc-block-components-totals-item__description"
/>
Expand All @@ -32,11 +36,15 @@ exports[`TotalsFooterItem Does not show the "including %s of tax" line if tax is
>
Total
</span>
<span
class="wc-block-formatted-money-amount wc-block-components-formatted-money-amount wc-block-components-totals-item__value"
<div
class="wc-block-components-totals-item__value"
>
£85.00
</span>
<span
class="wc-block-formatted-money-amount wc-block-components-formatted-money-amount wc-block-components-totals-footer-item-tax-value"
>
£85.00
</span>
</div>
<div
class="wc-block-components-totals-item__description"
/>
Expand All @@ -54,11 +62,15 @@ exports[`TotalsFooterItem Shows the "including %s TAX LABEL" line with single ta
>
Total
</span>
<span
class="wc-block-formatted-money-amount wc-block-components-formatted-money-amount wc-block-components-totals-item__value"
<div
class="wc-block-components-totals-item__value"
>
£85.00
</span>
<span
class="wc-block-formatted-money-amount wc-block-components-formatted-money-amount wc-block-components-totals-footer-item-tax-value"
>
£85.00
</span>
</div>
<div
class="wc-block-components-totals-item__description"
>
Expand All @@ -82,11 +94,15 @@ exports[`TotalsFooterItem Shows the "including %s TAX LABELS" line with multiple
>
Total
</span>
<span
class="wc-block-formatted-money-amount wc-block-components-formatted-money-amount wc-block-components-totals-item__value"
<div
class="wc-block-components-totals-item__value"
>
£85.00
</span>
<span
class="wc-block-formatted-money-amount wc-block-components-formatted-money-amount wc-block-components-totals-footer-item-tax-value"
>
£85.00
</span>
</div>
<div
class="wc-block-components-totals-item__description"
>
Expand All @@ -110,11 +126,15 @@ exports[`TotalsFooterItem Shows the "including %s of tax" line if tax is greater
>
Total
</span>
<span
class="wc-block-formatted-money-amount wc-block-components-formatted-money-amount wc-block-components-totals-item__value"
<div
class="wc-block-components-totals-item__value"
>
£85.00
</span>
<span
class="wc-block-formatted-money-amount wc-block-components-formatted-money-amount wc-block-components-totals-footer-item-tax-value"
>
£85.00
</span>
</div>
<div
class="wc-block-components-totals-item__description"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ const TotalsItemValue = ( {
currency,
}: Partial< TotalsItemProps > ): ReactElement | null => {
if ( isValidElement( value ) ) {
return <>{ value }</>;
return (
<div className="wc-block-components-totals-item__value">
{ value }
</div>
);
}

return Number.isFinite( value ) ? (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: fix

Fix broken CSS styles of the `totalValue` filter.