File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import type { PropertyValues } from "lit";
1010import { LitElement , html , nothing } from "lit" ;
1111import { customElement , property , state } from "lit/decorators" ;
1212import memoizeOne from "memoize-one" ;
13+ import { styleMap } from "lit/directives/style-map" ;
1314import { computeCssColor } from "../../../common/color/compute-color" ;
1415import { formatShortDateTime } from "../../../common/datetime/format_date_time" ;
1516import { storage } from "../../../common/decorators/storage" ;
@@ -104,13 +105,14 @@ export class HaConfigLabels extends LitElement {
104105 template : ( label ) =>
105106 label . color
106107 ? html `< div
107- style ="
108- background-color: ${ computeCssColor ( label . color ) } ;
109- border-radius: 10px;
110- border: 1px solid var(--outline-color);
111- box-sizing: border-box;
112- width: 20px;
113- height: 20px; "
108+ style =${ styleMap ( {
109+ backgroundColor : computeCssColor ( label . color ) ,
110+ borderRadius : "10px" ,
111+ border : "1px solid var(--outline-color)" ,
112+ boxSizing : "border-box" ,
113+ width : "20px" ,
114+ height : "20px" ,
115+ } ) }
114116 > </ div > `
115117 : nothing ,
116118 } ,
You can’t perform that action at this time.
0 commit comments