Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion src/panels/lovelace/cards/hui-shopping-list-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
import { ShoppingListCardConfig, SensorCardConfig } from "./types";
import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element";
import { actionHandler } from "../common/directives/action-handler-directive";
import { classMap } from "lit-html/directives/class-map";

@customElement("hui-shopping-list-card")
class HuiShoppingListCard extends LitElement implements LovelaceCard {
Expand Down Expand Up @@ -108,7 +109,12 @@ class HuiShoppingListCard extends LitElement implements LovelaceCard {
}

return html`
<ha-card .header="${this._config.title}">
<ha-card
.header=${this._config.title}
class=${classMap({
"has-header": "title" in this._config,
})}
>
<div class="addRow">
<ha-icon
class="addButton"
Expand Down Expand Up @@ -209,6 +215,15 @@ class HuiShoppingListCard extends LitElement implements LovelaceCard {

static get styles(): CSSResult {
return css`
ha-card {
padding-bottom: 16px;
padding-top: 16px;
}

.has-header {
padding-top: 0;
}

.editRow,
.addRow {
display: flex;
Expand Down