Skip to content

Commit

Permalink
Don't show 'Change widget' button when displaying a core widget
Browse files Browse the repository at this point in the history
  • Loading branch information
noisysocks committed May 31, 2019
1 parent 661a13a commit cf265ce
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions packages/block-library/src/legacy-widget/edit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,13 @@ class LegacyWidgetEdit extends Component {
<>
<BlockControls>
<Toolbar>
<IconButton
onClick={ this.changeWidget }
label={ __( 'Change widget' ) }
icon="update"
>
</IconButton>
{ ! widgetObject.isHidden && (
<IconButton
onClick={ this.changeWidget }
label={ __( 'Change widget' ) }
icon="update"
/>
) }
{ ! isCallbackWidget && (
<>
<Button
Expand Down

0 comments on commit cf265ce

Please sign in to comment.