Skip to content

Commit

Permalink
fix: show onhover menu only in edit mode (apache#17034)
Browse files Browse the repository at this point in the history
* fix on markdown hover menu

* lint-fix
  • Loading branch information
pkdotson authored and Emmanuel Bavoux committed Nov 14, 2021
1 parent 277a777 commit 51ad82a
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -350,11 +350,13 @@ class Markdown extends React.PureComponent {
className="dashboard-component dashboard-component-chart-holder"
data-test="dashboard-component-chart-holder"
>
<HoverMenu position="top">
<DeleteComponentButton
onDelete={this.handleDeleteComponent}
/>
</HoverMenu>
{editMode && (
<HoverMenu position="top">
<DeleteComponentButton
onDelete={this.handleDeleteComponent}
/>
</HoverMenu>
)}
{editMode && isEditing
? this.renderEditMode()
: this.renderPreviewMode()}
Expand Down

0 comments on commit 51ad82a

Please sign in to comment.