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 site icon animation #38702

Closed
wants to merge 1 commit into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { addQueryArgs } from '@wordpress/url';
import { wordpress } from '@wordpress/icons';
import { store as editorStore } from '@wordpress/editor';
import { store as coreStore } from '@wordpress/core-data';
import { useReducedMotion } from '@wordpress/compose';

/**
* Internal dependencies
Expand Down Expand Up @@ -49,26 +48,15 @@ function FullscreenModeClose( { showTooltip, icon, href } ) {
[]
);

const disableMotion = useReducedMotion();

if ( ! isActive || ! postType ) {
return null;
}

let buttonIcon = <Icon size="36px" icon={ wordpress } />;

const effect = {
expand: {
scale: 1.7,
borderRadius: 0,
transition: { type: 'tween', duration: '0.2' },
},
};

if ( siteIconUrl ) {
buttonIcon = (
<motion.img
variants={ ! disableMotion && effect }
<img
alt={ __( 'Site Icon' ) }
className="edit-post-fullscreen-mode-close_site-icon"
src={ siteIconUrl }
Expand Down