mirror of
https://github.com/home-assistant/frontend.git
synced 2025-10-28 13:09:46 +00:00
Upgrade to Lit 2 (#9199)
This commit is contained in:
@@ -1,18 +1,12 @@
|
||||
import "@material/mwc-formfield";
|
||||
import type { Formfield } from "@material/mwc-formfield";
|
||||
import { style } from "@material/mwc-formfield/mwc-formfield-css";
|
||||
import { css, CSSResultGroup, customElement } from "lit-element";
|
||||
import { Constructor } from "../types";
|
||||
|
||||
const MwcFormfield = customElements.get(
|
||||
"mwc-formfield"
|
||||
) as Constructor<Formfield>;
|
||||
|
||||
import { Formfield } from "@material/mwc-formfield";
|
||||
import { css, CSSResultGroup } from "lit";
|
||||
import { customElement } from "lit/decorators";
|
||||
@customElement("ha-formfield")
|
||||
export class HaFormfield extends MwcFormfield {
|
||||
// @ts-expect-error
|
||||
export class HaFormfield extends Formfield {
|
||||
protected static get styles(): CSSResultGroup {
|
||||
return [
|
||||
style,
|
||||
Formfield.styles,
|
||||
css`
|
||||
:host(:not([alignEnd])) ::slotted(ha-switch) {
|
||||
margin-right: 10px;
|
||||
|
||||
Reference in New Issue
Block a user