mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-24 13:27:22 +00:00
Merge pull request #1786 from zsarnett/glance-column-change
Changing Glance Column Width default to fill card
This commit is contained in:
commit
05ae92d5f8
@ -31,7 +31,6 @@ interface Config extends LovelaceConfig {
|
||||
show_name?: boolean;
|
||||
show_state?: boolean;
|
||||
title?: string;
|
||||
column_width?: string;
|
||||
theme?: string;
|
||||
entities: EntityConfig[];
|
||||
}
|
||||
@ -65,10 +64,10 @@ export class HuiGlanceCard extends HassLocalizeLitMixin(LitElement)
|
||||
}
|
||||
}
|
||||
|
||||
this.style.setProperty(
|
||||
"--glance-column-width",
|
||||
config.column_width || "20%"
|
||||
);
|
||||
const columnWidth =
|
||||
config.entities.length > 4 ? "20%" : `${100 / config.entities.length}%`;
|
||||
|
||||
this.style.setProperty("--glance-column-width", columnWidth);
|
||||
|
||||
this.configEntities = entities;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user