Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Use consistent and semantically correct HTML elements in the Cart and…
Browse files Browse the repository at this point in the history
… Checkout blocks (#9065)
  • Loading branch information
nielslange authored Apr 18, 2023
1 parent a836efd commit 14b8cad
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const OrderSummary = ( {
{ __( 'Order summary', 'woo-gutenberg-products-block' ) }
</span>
}
titleTag="h2"
>
<div className="wc-block-components-order-summary__content">
{ cartItems.map( ( cartItem ) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/**
* External dependencies
*/
import Title from '@woocommerce/base-components/title';
import classnames from 'classnames';

const Block = ( {
Expand All @@ -12,12 +11,11 @@ const Block = ( {
content: string;
} ): JSX.Element => {
return (
<Title
headingLevel="2"
<span
className={ classnames( className, 'wc-block-cart__totals-title' ) }
>
{ content }
</Title>
</span>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* External dependencies
*/
import { PlainText, useBlockProps } from '@wordpress/block-editor';
import Title from '@woocommerce/base-components/title';
import classnames from 'classnames';

/**
Expand All @@ -24,8 +23,7 @@ export const Edit = ( {
const blockProps = useBlockProps();
return (
<div { ...blockProps }>
<Title
headingLevel="2"
<span
className={ classnames(
className,
'wc-block-cart__totals-title'
Expand All @@ -39,7 +37,7 @@ export const Edit = ( {
}
style={ { backgroundColor: 'transparent' } }
/>
</Title>
</span>
</div>
);
};
Expand Down

0 comments on commit 14b8cad

Please sign in to comment.