diff --git a/packages/block-library/src/site-logo/edit.js b/packages/block-library/src/site-logo/edit.js index 36c217c1bf0c7..813a71cc30ab5 100644 --- a/packages/block-library/src/site-logo/edit.js +++ b/packages/block-library/src/site-logo/edit.js @@ -24,6 +24,8 @@ import { Button, DropZone, FlexItem, + __experimentalToolsPanel as ToolsPanel, + __experimentalToolsPanelItem as ToolsPanelItem, __experimentalItemGroup as ItemGroup, __experimentalHStack as HStack, __experimentalTruncate as Truncate, @@ -597,8 +599,20 @@ export default function LogoEdit( { const mediaInspectorPanel = ( canUserEdit || logoUrl ) && ( - -
+ { + setAttributes( { + logoUrl: null, + mediaItemData: null, + } ); + } } + > + !! logoUrl && ! canUserEdit } + label={ __( 'Preview Logo (Read-only)' ) } + resetAll={ () => setAttributes( { logoUrl: null } ) } + > { ! canUserEdit && !! logoUrl && ( ) } + + !! logoUrl && canUserEdit } + label={ __( 'Replace Logo' ) } + resetAll={ () => setAttributes( { logoUrl: null } ) } + > { canUserEdit && !! logoUrl && ( ) } + + ! logoUrl && canUserEdit } + label={ __( 'Upload Logo' ) } + resetAll={ () => setAttributes( { logoUrl: null } ) } + > { canUserEdit && ! logoUrl && ( ) } -
-
+ +
);