Skip to content

Commit

Permalink
fix dialog header style
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsfaber committed Jun 24, 2023
1 parent dd4d27b commit 3dff694
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@ export class ConfirmDeleteDialog extends LitElement {
if (!this._params) return html``;
return html`
<ha-dialog open .heading=${true} @closed=${this.closeDialog} @close-dialog=${this.closeDialog}>
<div slot="heading">
<ha-header-bar>
<ha-icon-button slot="navigationIcon" dialogAction="cancel" .path=${mdiClose}>
</ha-icon-button>
<span slot="title">${this._params.title}</span>
</ha-header-bar>
</div>
<ha-dialog-header slot="heading">
<ha-icon-button slot="navigationIcon" dialogAction="cancel" .path=${mdiClose}>
</ha-icon-button>
<span slot="title">${this._params.title}</span>
</ha-dialog-header>
<div class="wrapper">
${this._params.description}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ export class CreateAreaDialog extends SubscribeMixin(LitElement) {
if (!this._params) return html``;
return html`
<ha-dialog open .heading=${true} @closed=${this.closeDialog} @close-dialog=${this.closeDialog}>
<div slot="heading">
<ha-header-bar>
<ha-icon-button slot="navigationIcon" dialogAction="cancel" .path=${mdiClose}></ha-icon-button>
<ha-dialog-header slot="heading">
<ha-icon-button slot="navigationIcon" dialogAction="cancel" .path=${mdiClose}>
</ha-icon-button>
<span slot="title">
${this.area_id
? localize(
Expand All @@ -70,8 +70,7 @@ export class CreateAreaDialog extends SubscribeMixin(LitElement) {
)
: localize('panels.general.dialogs.create_area.title', this.hass.language)}
</span>
</ha-header-bar>
</div>
</ha-dialog-header>
<div class="wrapper">
<ha-textfield
label=${this.hass.localize('ui.components.area-picker.add_dialog.name')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@ export class EditMasterDialog extends LitElement {
if (!this._params) return html``;
return html`
<ha-dialog open .heading=${true} @closed=${this.closeDialog} @close-dialog=${this.closeDialog}>
<div slot="heading">
<ha-header-bar>
<ha-icon-button slot="navigationIcon" dialogAction="cancel" .path=${mdiClose}></ha-icon-button>
<ha-dialog-header slot="heading">
<ha-icon-button slot="navigationIcon" dialogAction="cancel" .path=${mdiClose}>
</ha-icon-button>
<span slot="title">${localize('panels.general.dialogs.edit_master.title', this.hass.language)}</span>
</ha-header-bar>
</div>
</ha-dialog-header>
<div class="wrapper">
<ha-textfield
label=${this.hass.localize('ui.components.area-picker.add_dialog.name')}
Expand Down
10 changes: 4 additions & 6 deletions custom_components/alarmo/frontend/src/dialogs/error-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,13 @@ export class ErrorDialog extends LitElement {
if (!this._params) return html``;
return html`
<ha-dialog open .heading=${true} @closed=${this.closeDialog} @close-dialog=${this.closeDialog}>
<div slot="heading">
<ha-header-bar>
<ha-icon-button slot="navigationIcon" dialogAction="cancel" .path=${mdiClose}>
</ha-icon-button>
<ha-dialog-header slot="heading">
<ha-icon-button slot="navigationIcon" dialogAction="cancel" .path=${mdiClose}>
</ha-icon-button>
<span slot="title">
${this.hass.localize('state_badge.default.error')}
</span>
</ha-header-bar>
</div>
</ha-dialog-header>
<div class="wrapper">
${this._params.error || ''}
</div>
Expand Down
6 changes: 1 addition & 5 deletions custom_components/alarmo/frontend/src/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const commonStyle = css`
right: 0px;
}
mwc-button.active {
mwc-button.active:not([disabled]) {
background: var(--primary-color);
--mdc-theme-primary: var(--text-primary-color);
border-radius: 4px;
Expand All @@ -51,10 +51,6 @@ export const commonStyle = css`
--mdc-theme-primary: var(--success-color);
}
mwc-button.disabled.active {
opacity: 0.5;
}
div.entity-row {
display: flex;
align-items: center;
Expand Down

0 comments on commit 3dff694

Please sign in to comment.