mirror of
https://github.com/home-assistant/frontend.git
synced 2025-08-01 05:27:46 +00:00
Merge pull request #5402 from zsarnett/shopping-card-fix
Shopping List Card: Padding Bottom
This commit is contained in:
commit
4c4549eb37
@ -27,6 +27,7 @@ import {
|
|||||||
import { ShoppingListCardConfig, SensorCardConfig } from "./types";
|
import { ShoppingListCardConfig, SensorCardConfig } from "./types";
|
||||||
import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element";
|
import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element";
|
||||||
import { actionHandler } from "../common/directives/action-handler-directive";
|
import { actionHandler } from "../common/directives/action-handler-directive";
|
||||||
|
import { classMap } from "lit-html/directives/class-map";
|
||||||
|
|
||||||
@customElement("hui-shopping-list-card")
|
@customElement("hui-shopping-list-card")
|
||||||
class HuiShoppingListCard extends LitElement implements LovelaceCard {
|
class HuiShoppingListCard extends LitElement implements LovelaceCard {
|
||||||
@ -108,7 +109,12 @@ class HuiShoppingListCard extends LitElement implements LovelaceCard {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return html`
|
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">
|
<div class="addRow">
|
||||||
<ha-icon
|
<ha-icon
|
||||||
class="addButton"
|
class="addButton"
|
||||||
@ -209,6 +215,15 @@ class HuiShoppingListCard extends LitElement implements LovelaceCard {
|
|||||||
|
|
||||||
static get styles(): CSSResult {
|
static get styles(): CSSResult {
|
||||||
return css`
|
return css`
|
||||||
|
ha-card {
|
||||||
|
padding-bottom: 16px;
|
||||||
|
padding-top: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.has-header {
|
||||||
|
padding-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.editRow,
|
.editRow,
|
||||||
.addRow {
|
.addRow {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user