diff --git a/dist/weather-card-editor.js b/dist/weather-card-editor.js index eef23591..e3d14216 100644 --- a/dist/weather-card-editor.js +++ b/dist/weather-card-editor.js @@ -11,8 +11,16 @@ const fireEvent = (node, type, detail, options) => { return event; }; +if ( + !customElements.get("ha-switch") && + customElements.get("paper-toggle-button") +) { + customElements.define("ha-switch", customElements.get("paper-toggle-button")); +} + const LitElement = Object.getPrototypeOf(customElements.get("hui-view")); const html = LitElement.prototype.html; +const css = LitElement.prototype.css; export class WeatherCardEditor extends LitElement { setConfig(config) { @@ -57,7 +65,6 @@ export class WeatherCardEditor extends LitElement { ); return html` - ${this.renderStyle()}
`} - ${customElements.get("paper-toggle-button") - ? html` - Show current - Show details - Show forecast - ` - : html` - Show current - Show details - Show forecast - `} + Show current + Show details + Show forecast
`; @@ -169,20 +153,18 @@ export class WeatherCardEditor extends LitElement { fireEvent(this, "config-changed", { config: this._config }); } - renderStyle() { - return html` - + static get styles() { + return css` + ha-switch { + padding-top: 16px; + } + .side-by-side { + display: flex; + } + .side-by-side > * { + flex: 1; + padding-right: 4px; + } `; } }