diff --git a/packages/editor/src/components/preview-dropdown/index.js b/packages/editor/src/components/preview-dropdown/index.js index e066afe1782de9..961936d4b15420 100644 --- a/packages/editor/src/components/preview-dropdown/index.js +++ b/packages/editor/src/components/preview-dropdown/index.js @@ -10,14 +10,7 @@ import { Icon, } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; -import { - check, - desktop, - mobile, - tablet, - external, - chevronUpDown, -} from '@wordpress/icons'; +import { check, desktop, mobile, tablet, external } from '@wordpress/icons'; import { useSelect, useDispatch } from '@wordpress/data'; import { store as coreStore } from '@wordpress/core-data'; import { store as preferencesStore } from '@wordpress/preferences'; @@ -86,11 +79,7 @@ export default function PreviewDropdown( { forceIsAutosaveable, disabled } ) { popoverProps={ popoverProps } toggleProps={ toggleProps } menuProps={ menuProps } - icon={ - isZoomedOutView - ? chevronUpDown - : deviceIcons[ deviceType.toLowerCase() ] - } + icon={ deviceIcons[ deviceType.toLowerCase() ] } label={ __( 'View' ) } disableOpenOnArrowDown={ disabled } > @@ -129,7 +118,6 @@ export default function PreviewDropdown( { forceIsAutosaveable, disabled } ) { { - setDeviceType( 'Desktop' ); __unstableSetEditorMode( 'edit' ); } } icon={ ! isZoomedOutView && check } @@ -142,6 +130,7 @@ export default function PreviewDropdown( { forceIsAutosaveable, disabled } ) { __unstableSetEditorMode( 'zoom-out' ); } } icon={ isZoomedOutView && check } + disabled={ deviceType !== 'Desktop' } > { __( 'Zoom to 50%' ) }