Skip to content

Commit

Permalink
Add a button to delete the site logo
Browse files Browse the repository at this point in the history
  • Loading branch information
scruffian committed Dec 3, 2019
1 parent 9810aee commit f81fb17
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 212 deletions.
9 changes: 9 additions & 0 deletions packages/block-library/src/site-logo/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ export default function LogoEdit( { attributes: { align, width }, children, clas
toggleIsEditing();
};

const deleteLogo = () => {
setLogo('');
};

const controls = (
<>
<BlockControls>
Expand Down Expand Up @@ -132,6 +136,11 @@ export default function LogoEdit( { attributes: { align, width }, children, clas
onCancel={ !! url && toggleIsEditing }
onError={ onError }
>
{ !! url && (
<IconButton isLarge icon="delete" onClick={ deleteLogo }>
{ __( 'Delete Site Logo' ) }
</IconButton>
) }
{ children }
</MediaPlaceholder>;

Expand Down
212 changes: 0 additions & 212 deletions packages/blocks/src/store/reducer.js

This file was deleted.

0 comments on commit f81fb17

Please sign in to comment.