Enlarge touch target delete button (#6893)

This commit is contained in:
Bram Kragten 2020-09-09 21:02:14 +02:00 committed by GitHub
parent e3b18a33ca
commit d99d092784
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -526,7 +526,7 @@ class HaSidebar extends LitElement {
private async _hidePanel(ev: Event) { private async _hidePanel(ev: Event) {
ev.preventDefault(); ev.preventDefault();
const panel = (ev.target as any).panel; const panel = (ev.currentTarget as any).panel;
if (this._hiddenPanels.includes(panel)) { if (this._hiddenPanels.includes(panel)) {
return; return;
} }
@ -692,12 +692,13 @@ class HaSidebar extends LitElement {
: html`<ha-icon slot="item-icon" .icon=${icon}></ha-icon>`} : html`<ha-icon slot="item-icon" .icon=${icon}></ha-icon>`}
<span class="item-text">${title}</span> <span class="item-text">${title}</span>
${this._editMode ${this._editMode
? html`<ha-svg-icon ? html`<mwc-icon-button
class="hide-panel" class="hide-panel"
.panel=${urlPath} .panel=${urlPath}
@click=${this._hidePanel} @click=${this._hidePanel}
.path=${mdiClose} >
></ha-svg-icon>` <ha-svg-icon .path=${mdiClose}></ha-svg-icon>
</mwc-icon-button>`
: ""} : ""}
</paper-icon-item> </paper-icon-item>
</a> </a>

View File

@ -57,7 +57,7 @@ export const sortableStyles = css`
.hide-panel { .hide-panel {
display: none; display: none;
position: absolute; position: absolute;
right: 8px; right: 0;
} }
:host([expanded]) .hide-panel { :host([expanded]) .hide-panel {