diff --git a/docs/designers-developers/developers/slotfills/main-dashboard-button.md b/docs/designers-developers/developers/slotfills/main-dashboard-button.md index ba87a04be80379..3392eed131218f 100644 --- a/docs/designers-developers/developers/slotfills/main-dashboard-button.md +++ b/docs/designers-developers/developers/slotfills/main-dashboard-button.md @@ -40,7 +40,7 @@ import { close } from '@wordpress/icons'; const MainDashboardButtonIconTest = () => ( - + ); diff --git a/packages/edit-post/src/components/header/fullscreen-mode-close/index.js b/packages/edit-post/src/components/header/fullscreen-mode-close/index.js index d7da08c758470f..93d7f680487930 100644 --- a/packages/edit-post/src/components/header/fullscreen-mode-close/index.js +++ b/packages/edit-post/src/components/header/fullscreen-mode-close/index.js @@ -12,7 +12,7 @@ import { __ } from '@wordpress/i18n'; import { addQueryArgs } from '@wordpress/url'; import { wordpress } from '@wordpress/icons'; -function FullscreenModeClose( { showTooltip } ) { +function FullscreenModeClose( { showTooltip, icon, href } ) { const { isActive, isRequestingSiteIcon, postType, siteIconUrl } = useSelect( ( select ) => { const { getCurrentPostType } = select( 'core/editor' ); @@ -50,16 +50,26 @@ function FullscreenModeClose( { showTooltip } ) { src={ siteIconUrl } /> ); - } else if ( isRequestingSiteIcon ) { + } + + if ( isRequestingSiteIcon ) { buttonIcon = null; } + // Override default icon if custom icon is provided via props. + if ( icon ) { + buttonIcon = ; + } + return (