Skip to content

Commit

Permalink
Remove duplicated className in Card component (#35333)
Browse files Browse the repository at this point in the history
* Remove duplicated className in Card component

* Update Card and Flyout snapshots
  • Loading branch information
stokesman committed Oct 7, 2021
1 parent 83bbd27 commit 3f45b9c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions packages/components/src/card/card/hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ export function useCard( props ) {
styles.Card,
isBorderless && styles.boxShadowless,
isRounded && styles.rounded,
// This classname is added for legacy compatibility reasons.
'components-card',
className
);
}, [ className, isBorderless, isRounded ] );
Expand Down
10 changes: 5 additions & 5 deletions packages/components/src/card/test/__snapshots__/index.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ Snapshot Diff:
@@ -1,30 +1,30 @@
<div>
<div
- class="components-surface components-card components-card css-ssx2ib-View-Surface-getBorders-primary-Card-boxShadowless-rounded em57xhy0"
+ class="components-surface components-card components-card css-1vyvcpq-View-Surface-getBorders-primary-Card-rounded em57xhy0"
- class="components-surface components-card css-ssx2ib-View-Surface-getBorders-primary-Card-boxShadowless-rounded em57xhy0"
+ class="components-surface components-card css-1vyvcpq-View-Surface-getBorders-primary-Card-rounded em57xhy0"
data-wp-c16t="true"
data-wp-component="Card"
>
Expand Down Expand Up @@ -375,7 +375,7 @@ Object {
<body>
<div>
<div
class="components-surface components-card components-card emotion-0 emotion-1"
class="components-surface components-card emotion-0 emotion-1"
data-wp-c16t="true"
data-wp-component="Card"
>
Expand Down Expand Up @@ -630,7 +630,7 @@ Object {
<div>
<div
class="components-surface components-card components-card emotion-0 emotion-1"
class="components-surface components-card emotion-0 emotion-1"
data-wp-c16t="true"
data-wp-component="Card"
>
Expand Down Expand Up @@ -850,7 +850,7 @@ exports[`Card Card component should warn when the isElevated prop is passed 1`]
<div>
<div
class="components-surface components-card components-card emotion-0 emotion-1"
class="components-surface components-card emotion-0 emotion-1"
data-wp-c16t="true"
data-wp-component="Card"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ exports[`props should render correctly 1`] = `
}
<div
class="components-surface components-card components-card emotion-0 emotion-1 emotion-2"
class="components-surface components-card emotion-0 emotion-1 emotion-2"
data-wp-c16t="true"
data-wp-component="Card"
>
Expand Down

0 comments on commit 3f45b9c

Please sign in to comment.