mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-12 03:46:34 +00:00
Takes out column width variable
This commit is contained in:
parent
35941a58a5
commit
62d27a17d5
@ -30,7 +30,6 @@ interface Config extends LovelaceConfig {
|
|||||||
show_name?: boolean;
|
show_name?: boolean;
|
||||||
show_state?: boolean;
|
show_state?: boolean;
|
||||||
title?: string;
|
title?: string;
|
||||||
column_width?: string;
|
|
||||||
theming?: "primary";
|
theming?: "primary";
|
||||||
entities: EntityConfig[];
|
entities: EntityConfig[];
|
||||||
}
|
}
|
||||||
@ -65,10 +64,7 @@ class HuiGlanceCard extends HassLocalizeLitMixin(LitElement)
|
|||||||
const columnWidth =
|
const columnWidth =
|
||||||
config.entities.length > 4 ? "20%" : `${100 / config.entities.length}%`;
|
config.entities.length > 4 ? "20%" : `${100 / config.entities.length}%`;
|
||||||
|
|
||||||
this.style.setProperty(
|
this.style.setProperty("--glance-column-width", columnWidth);
|
||||||
"--glance-column-width",
|
|
||||||
config.column_width || columnWidth
|
|
||||||
);
|
|
||||||
|
|
||||||
if (config.theming) {
|
if (config.theming) {
|
||||||
if (typeof config.theming !== "string") {
|
if (typeof config.theming !== "string") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user