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 useless clsx calls. #61969

Merged
merged 2 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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: 1 addition & 1 deletion packages/block-library/src/site-logo/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const SiteLogo = ( {
const [ { naturalWidth, naturalHeight }, setNaturalSize ] = useState( {} );
const [ isEditingImage, setIsEditingImage ] = useState( false );
const { toggleSelection } = useDispatch( blockEditorStore );
const classes = clsx( 'custom-logo-link' );
const classes = 'custom-logo-link';
DaniGuardiola marked this conversation as resolved.
Show resolved Hide resolved
const { imageEditing, maxWidth, title } = useSelect( ( select ) => {
const settings = select( blockEditorStore ).getSettings();
const siteEntities = select( coreStore ).getEntityRecord(
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/animate/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function getDefaultOrigin( type?: GetAnimateOptions[ 'type' ] ) {
*/
export function getAnimateClassName( options: GetAnimateOptions ) {
if ( options.type === 'loading' ) {
return clsx( 'components-animate__loading' );
return 'components-animate__loading';
}

const { type, origin = getDefaultOrigin( type ) } = options;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { PointerCircle } from './styles/focal-point-style';
/**
* External dependencies
*/
import clsx from 'clsx';
import type { FocalPointProps } from './types';
import type { WordPressComponentProps } from '../context';

Expand All @@ -15,7 +14,7 @@ export default function FocalPoint( {
top = '50%',
...props
}: WordPressComponentProps< FocalPointProps, 'div' > ) {
const classes = clsx( 'components-focal-point-picker__icon_container' );
const classes = 'components-focal-point-picker__icon_container';
DaniGuardiola marked this conversation as resolved.
Show resolved Hide resolved

const style = { left, top };

Expand Down
4 changes: 1 addition & 3 deletions packages/edit-site/src/components/save-panel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,7 @@ export default function SavePanel() {
>
<Button
variant="secondary"
className={ clsx(
'edit-site-editor__toggle-save-panel-button'
) }
className={ 'edit-site-editor__toggle-save-panel-button' }
DaniGuardiola marked this conversation as resolved.
Show resolved Hide resolved
onClick={ () => setIsSaveViewOpened( true ) }
aria-haspopup={ 'dialog' }
disabled={ disabled }
Expand Down
7 changes: 1 addition & 6 deletions storybook/decorators/with-global-css.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* External dependencies
*/
import clsx from 'clsx';

/**
* WordPress dependencies
*/
Expand Down Expand Up @@ -59,7 +54,7 @@ export const WithGlobalCSS = ( Story, context ) => {
}, [ context.globals.css ] );

return (
<div className={ clsx( classes ) }>
<div className={ classes }>
{ externalStyles.map( ( stylesheet ) => (
DaniGuardiola marked this conversation as resolved.
Show resolved Hide resolved
<link key={ stylesheet } rel="stylesheet" href={ stylesheet } />
) ) }
Expand Down
Loading