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

Remove duplicated className in Card component #35333

Merged
merged 2 commits into from
Oct 7, 2021
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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