fix: show onhover menu only in edit mode (#17034)

* fix on markdown hover menu

* lint-fix
This commit is contained in:
Phillip Kelley-Dotson 2021-10-08 10:54:16 -07:00 committed by GitHub
parent e32a12fa0b
commit bdbcfbc8fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 5 deletions

View File

@ -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()}