From ea6e8c5dabfac12fba14d63fdec482127d830acb Mon Sep 17 00:00:00 2001 From: Carolina Nymark Date: Thu, 29 Jun 2023 05:45:20 +0200 Subject: [PATCH] Focus Mode: Use the symbol icon if a pattern is being edited (#52031) --- .../header-edit-mode/document-actions/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/edit-site/src/components/header-edit-mode/document-actions/index.js b/packages/edit-site/src/components/header-edit-mode/document-actions/index.js index f31c789043e72..3a048e753631f 100644 --- a/packages/edit-site/src/components/header-edit-mode/document-actions/index.js +++ b/packages/edit-site/src/components/header-edit-mode/document-actions/index.js @@ -20,6 +20,7 @@ import { chevronLeftSmall as chevronLeftSmallIcon, page as pageIcon, navigation as navigationIcon, + symbol, } from '@wordpress/icons'; import { displayShortcut } from '@wordpress/keycodes'; import { useState, useEffect, useRef } from '@wordpress/element'; @@ -118,10 +119,17 @@ function TemplateDocumentActions( { className, onBack } ) { const entityLabel = getEntityLabel( record.type ); + let typeIcon = icon; + if ( record.type === 'wp_navigation' ) { + typeIcon = navigationIcon; + } else if ( record.type === 'wp_block' ) { + typeIcon = symbol; + } + return (