reapply suggestions from code review

This commit is contained in:
Denis Shulyaka 2020-06-18 16:50:49 +03:00
parent f0b0200932
commit a763ad5bf1
2 changed files with 48 additions and 42 deletions

View File

@ -27,8 +27,10 @@ class HaEntityHumidifier extends HaEntityToggle {
`; `;
} }
static get styles(): CSSResult { static get styles(): CSSResult[] {
return css` return [
super.styles,
css`
:host { :host {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -53,9 +55,8 @@ class HaEntityHumidifier extends HaEntityToggle {
display: inline-block; display: inline-block;
direction: ltr; direction: ltr;
} }
`,
${super.styles} ];
`;
} }
} }

View File

@ -138,14 +138,18 @@ export class HaEntityToggle extends LitElement {
}, 2000); }, 2000);
} }
static get styles(): CSSResult { static get styles(): CSSResult[] {
return css` return [
css`
:host { :host {
white-space: nowrap; white-space: nowrap;
min-width: 38px; min-width: 38px;
} }
ha-icon-button { ha-icon-button {
color: var(--ha-icon-button-inactive-color, var(--primary-text-color)); color: var(
--ha-icon-button-inactive-color,
var(--primary-text-color)
);
transition: color 0.5s; transition: color 0.5s;
} }
ha-icon-button[state-active] { ha-icon-button[state-active] {
@ -154,7 +158,8 @@ export class HaEntityToggle extends LitElement {
ha-switch { ha-switch {
padding: 13px 5px; padding: 13px 5px;
} }
`; `,
];
} }
} }