-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Replace classnames with clsx #61138
Replace classnames with clsx #61138
Conversation
It looks like this PR is the first one making a change to the I tried rolling that back the update to actions/setup-node, and and it worked for me (#61289). I also moved the debugging steps we added above to that PR to keep this one specific to the task at hand. |
Thanks @desrosj, I'm gonna remove the unrelated CI debug changes in order to merge the PR. |
…gnore/clsx-size-test
Noting that this replaced at least five instances of |
At least this change introduces an unintentional side effect: diff --git a/packages/block-library/src/cover/edit.native.js b/packages/block-library/src/cover/edit.native.js
index 1fc1519f47f94..c5fe140e8fe23 100644
--- a/packages/block-library/src/cover/edit.native.js
+++ b/packages/block-library/src/cover/edit.native.js
@@ -10,7 +10,7 @@ import {
Platform,
} from 'react-native';
import Video from 'react-native-video';
-import classnames from 'classnames/dedupe';
+import clsx from 'clsx';
/**
* WordPress dependencies
@@ -298,7 +298,7 @@ const Cover = ( {
// Ensure that "is-light" is removed from "className" attribute if cover background is dark.
if ( isCoverDark && attributes.className?.includes( 'is-light' ) ) {
- const className = classnames( attributes.className, {
+ const className = clsx( attributes.className, {
'is-light': false,
} );
setAttributes( { Assuming
|
Good catch, thanks. Will fix. |
PR originally started as a test, see: #61091 (comment)
Then it replaced #61091, see: #61091 (comment)
There are no significant changes in this PR that weren't already part of the previous PR, I only synced with trunk and ensured that all usage of classnames was still consistently replaced with cslx.