Skip to content

Commit

Permalink
fix: group padding when no icon
Browse files Browse the repository at this point in the history
  • Loading branch information
punxaphil committed Oct 18, 2024
1 parent 713cadf commit d77c01e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Group extends LitElement {
return html`<ha-icon .icon=${icons[0]}></ha-icon>`;
}
const iconsToShow = icons.slice(0, 4);
return html` <div class="icons">
return html` <div class="icons" ?empty=${length === 0}>
${iconsToShow.map((icon, index) => {
if (index < 3 || length === 4) {
return html` <ha-icon class="small" .icon=${icon}></ha-icon>`;
Expand Down Expand Up @@ -134,6 +134,11 @@ class Group extends LitElement {
max-width: 5rem;
}
.icons[empty] {
min-width: 1rem;
max-width: 1rem;
}
ha-icon {
--mdc-icon-size: 3rem;
margin: 1rem;
Expand Down

0 comments on commit d77c01e

Please sign in to comment.